From d649026c100df3776dbfe40356cfbd8f7c624a36 Mon Sep 17 00:00:00 2001 From: Sam Ford <1584702+samford@users.noreply.github.com> Date: Wed, 20 Oct 2021 11:50:52 -0400 Subject: [PATCH] ResourceAuditor: Skip branch error when using tag --- Library/Homebrew/resource_auditor.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/Library/Homebrew/resource_auditor.rb b/Library/Homebrew/resource_auditor.rb index 3f48259eb6..8155d311c0 100644 --- a/Library/Homebrew/resource_auditor.rb +++ b/Library/Homebrew/resource_auditor.rb @@ -143,6 +143,7 @@ module Homebrew return unless @strict return if spec_name != :head return unless Utils::Git.remote_exists?(url) + return if specs[:tag].present? branch = Utils.popen_read("git", "ls-remote", "--symref", url, "HEAD") .match(%r{ref: refs/heads/(.*?)\s+HEAD})[1]