bump-formula-pr: fix regression when formula.tap is Nil

This commit is contained in:
jjergus 2020-08-14 11:42:50 -07:00
parent 535e7dc836
commit 8fb6218d05
No known key found for this signature in database
GPG Key ID: B29AA3EB67798C77

View File

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