diff options
| author | Markus Reiter | 2016-09-23 22:02:23 +0200 |
|---|---|---|
| committer | Markus Reiter | 2016-09-24 12:24:35 +0200 |
| commit | 58e36c73193befb57d351344cea2a4a33fef850d (patch) | |
| tree | 3d26751835440341e5a42a189cf580e6253785df /Library/Homebrew/cmd/install.rb | |
| parent | bbc3f1c3a852e6cfd26a7a7c333092fae0520eb4 (diff) | |
| download | brew-58e36c73193befb57d351344cea2a4a33fef850d.tar.bz2 | |
Fix Style/GuardClause.
Diffstat (limited to 'Library/Homebrew/cmd/install.rb')
| -rw-r--r-- | Library/Homebrew/cmd/install.rb | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb index 0a6dd5a46..8a8323252 100644 --- a/Library/Homebrew/cmd/install.rb +++ b/Library/Homebrew/cmd/install.rb @@ -203,13 +203,12 @@ module Homebrew # If they haven't updated in 48 hours (172800 seconds), that # might explain the error master = HOMEBREW_REPOSITORY/".git/refs/heads/master" - if master.exist? && (Time.now.to_i - File.mtime(master).to_i) > 172800 - ohai "You haven't updated Homebrew in a while." - puts <<-EOS.undent - A formula for #{e.name} might have been added recently. - Run `brew update` to get the latest Homebrew updates! - EOS - end + return unless master.exist? && (Time.now.to_i - File.mtime(master).to_i) > 172800 + ohai "You haven't updated Homebrew in a while." + puts <<-EOS.undent + A formula for #{e.name} might have been added recently. + Run `brew update` to get the latest Homebrew updates! + EOS end end end |
