diff --git a/Library/Homebrew/dev-cmd/audit.rb b/Library/Homebrew/dev-cmd/audit.rb index 67f325fbad304..08386a0f902ce 100644 --- a/Library/Homebrew/dev-cmd/audit.rb +++ b/Library/Homebrew/dev-cmd/audit.rb @@ -398,7 +398,8 @@ def audit_license return if user.blank? github_license = GitHub.get_repo_license(user, repo) - return if github_license && (licenses + ["NOASSERTION"]).include?(github_license) + return unless github_license + return if (licenses + ["NOASSERTION"]).include?(github_license) return if PERMITTED_LICENSE_MISMATCHES[github_license]&.any? { |license| licenses.include? license } return if PERMITTED_FORMULA_LICENSE_MISMATCHES[formula.name] == formula.version