Skip to content
Snippets Groups Projects
Commit a8a16928 authored by Misty De Meo's avatar Misty De Meo
Browse files

doctor: Skip outdated check when offline

Fixes Homebrew/homebrew#13535.
parent 17953f2b
No related branches found
No related tags found
No related merge requests found
......@@ -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"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment