Merge pull request #11239 from MikeMcQuaid/audit_core_bottle_disabled_unneeded

formula_auditor: don't allow `bottle :unneeded` in core.
This commit is contained in:
Mike McQuaid 2021-06-29 13:23:17 +01:00 committed by GitHub
commit 5a5db3ab96
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -438,14 +438,17 @@ module Homebrew
def audit_bottle_disabled
return unless formula.bottle_disabled?
return if formula.bottle_unneeded?
problem "Unrecognized bottle modifier" unless formula.bottle_disable_reason.valid?
return unless @core_tap
if !formula.bottle_disable_reason.valid?
problem "Unrecognized bottle modifier"
elsif @core_tap
if formula.bottle_unneeded?
problem "Formulae in homebrew/core should not use `bottle :unneeded`"
else
problem "Formulae in homebrew/core should not use `bottle :disabled`"
end
end
end
def audit_github_repository_archived
return if formula.deprecated? || formula.disabled?