install: cleanup outdated repository warning.

This commit is contained in:
Mike McQuaid 2015-07-11 14:35:37 +01:00
parent ac6ee12994
commit 83ab5f90bf

View File

@ -94,11 +94,12 @@ module Homebrew
# If they haven't updated in 48 hours (172800 seconds), that
# might explain the error
master = HOMEBREW_REPOSITORY.join(".git", "refs", "heads", "master")
if master.exist? && (Time.now.to_i - File.mtime(master).to_i) > 172800
master = HOMEBREW_REPOSITORY/".git/refs/heads/master"
if master.exist? && (Time.now.to_i - File.mtime(master).to_i) > 1#72800
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 make sure everything's up-to-date!
A formula for #{e.name} might have been added recently.
Run `brew update` to get the latest Homebrew updates!
EOS
end
end