diff options
| author | Misty De Meo | 2012-07-22 12:26:56 -0500 |
|---|---|---|
| committer | Misty De Meo | 2012-07-22 12:57:03 -0500 |
| commit | 68caf03faaea291196387e0efdd352648b0f2070 (patch) | |
| tree | 8689ccd29bf21425afd6bfed460c2e7406f9aa12 /Library/Homebrew/cmd | |
| parent | 9c1e7cb9aaca19c6e649601069023f775d2c188d (diff) | |
| download | homebrew-68caf03faaea291196387e0efdd352648b0f2070.tar.bz2 | |
doctor: Skip outdated check when offline
Fixes #13535.
Diffstat (limited to 'Library/Homebrew/cmd')
| -rw-r--r-- | Library/Homebrew/cmd/doctor.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb index 6e9796a70..e510b7e84 100644 --- a/Library/Homebrew/cmd/doctor.rb +++ b/Library/Homebrew/cmd/doctor.rb @@ -856,8 +856,10 @@ def check_for_outdated_homebrew HOMEBREW_REPOSITORY.cd do if File.directory? ".git" local = `git rev-parse -q --verify refs/remotes/origin/master`.chomp - remote = /^([a-f0-9]{40})/.match(`git ls-remote origin refs/heads/master`)[0] - return if local == remote + remote = /^([a-f0-9]{40})/.match(`git ls-remote origin refs/heads/master 2>/dev/null`) + if remote.nil? || local == remote[0] + return + end end timestamp = if File.directory? ".git" |
