ResourceAuditor: Skip branch error when using tag

This commit is contained in:
Sam Ford 2021-10-20 11:50:52 -04:00
parent bfe9693083
commit d649026c10
No known key found for this signature in database
GPG Key ID: 95209E46C7FFDEFE

View File

@ -143,6 +143,7 @@ module Homebrew
return unless @strict return unless @strict
return if spec_name != :head return if spec_name != :head
return unless Utils::Git.remote_exists?(url) return unless Utils::Git.remote_exists?(url)
return if specs[:tag].present?
branch = Utils.popen_read("git", "ls-remote", "--symref", url, "HEAD") branch = Utils.popen_read("git", "ls-remote", "--symref", url, "HEAD")
.match(%r{ref: refs/heads/(.*?)\s+HEAD})[1] .match(%r{ref: refs/heads/(.*?)\s+HEAD})[1]