diff --git a/Library/Homebrew/utils/shared_audits.rb b/Library/Homebrew/utils/shared_audits.rb index 3957c3d76420a..2ef6d5a016347 100644 --- a/Library/Homebrew/utils/shared_audits.rb +++ b/Library/Homebrew/utils/shared_audits.rb @@ -64,7 +64,7 @@ def self.github_release(user, repo, tag, formula: nil, cask: nil) return "#{tag} is a GitHub pre-release." if release["prerelease"] && [version, "all", "any"].exclude?(exception) - if !release["prerelease"] && [version, "any"].exclude?(exception) + if !release["prerelease"] && exception && [version, "any"].exclude?(exception) return "#{tag} is not a GitHub pre-release but '#{name}' is in the GitHub prerelease allowlist." end