Merge pull request #8353 from jjergus/bump-fix

bump-formula-pr: fix regression when formula.tap is nil
This commit is contained in:
Dawid Dziurla 2020-08-14 21:26:32 +02:00 committed by GitHub
commit d99ac0b633
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -105,8 +105,10 @@ module Homebrew
end
end
end
origin_branch = Utils.popen_read("git", "-C", formula.tap.path.to_s, "symbolic-ref", "-q", "--short",
"refs/remotes/origin/HEAD").chomp.presence
if formula.tap
origin_branch = Utils.popen_read("git", "-C", formula.tap.path.to_s, "symbolic-ref", "-q", "--short",
"refs/remotes/origin/HEAD").chomp.presence
end
origin_branch ||= "origin/master"
[formula.tap&.full_name, origin_branch, "-"]
end