audit: return if no github license were found

This commit is contained in:
Dawid Dziurla 2020-08-19 19:49:41 +02:00
parent dd71f388c1
commit 2689213f92
No known key found for this signature in database
GPG Key ID: 7B6D8368172E9B0B

View File

@ -398,6 +398,7 @@ module Homebrew
return if user.blank?
github_license = GitHub.get_repo_license(user, repo)
return unless github_license
return if github_license && (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