doctor: improve outdated Homebrew check
We now skip the outdated check if our local origin/master tracking branch matches the origin remote's current master. This prevents false positives when we are actually up-to-date but the latest commit is over 24 hours old. Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
parent
7af4622b0f
commit
65bea86ae9
@ -835,6 +835,12 @@ end
|
||||
|
||||
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
|
||||
end
|
||||
|
||||
timestamp = if File.directory? ".git"
|
||||
`git log -1 --format="%ct" HEAD`.to_i
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user