From 8fb6218d052cd7e33435ba88f3ecc38c62278e4c Mon Sep 17 00:00:00 2001 From: jjergus Date: Fri, 14 Aug 2020 11:42:50 -0700 Subject: [PATCH] bump-formula-pr: fix regression when formula.tap is Nil --- Library/Homebrew/dev-cmd/bump-formula-pr.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/dev-cmd/bump-formula-pr.rb b/Library/Homebrew/dev-cmd/bump-formula-pr.rb index ed925920ec..8ed387f7de 100644 --- a/Library/Homebrew/dev-cmd/bump-formula-pr.rb +++ b/Library/Homebrew/dev-cmd/bump-formula-pr.rb @@ -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