Merge pull request #14011 from samford/resource_auditor-fix-audit_head_branch-error
ResourceAuditor: Fix #audit_head_branch error
This commit is contained in:
commit
95364610cc
@ -146,9 +146,8 @@ module Homebrew
|
||||
return if specs[:tag].present?
|
||||
|
||||
branch = Utils.popen_read("git", "ls-remote", "--symref", url, "HEAD")
|
||||
.match(%r{ref: refs/heads/(.*?)\s+HEAD})[1]
|
||||
|
||||
return if branch == specs[:branch]
|
||||
.match(%r{ref: refs/heads/(.*?)\s+HEAD})&.to_a&.second
|
||||
return if branch.blank? || branch == specs[:branch]
|
||||
|
||||
problem "Use `branch: \"#{branch}\"` to specify the default branch"
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user