Merge pull request #4411 from commitay/versioned-no-head-spec

audit: disallow unstable specs for versioned formulae
This commit is contained in:
Mike McQuaid 2018-07-04 09:49:49 +01:00 committed by GitHub
commit 0c38ceb6f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -571,8 +571,19 @@ module Homebrew
end
end
if @new_formula && formula.head
new_formula_problem "Formulae should not have a HEAD spec"
if formula.head || formula.devel
unstable_spec_message = "Formulae should not have an unstable spec"
if @new_formula
new_formula_problem unstable_spec_message
elsif formula.versioned_formula?
versioned_unstable_spec = %w[
bash-completion@2
imagemagick@6
openssl@1.1
python@2
]
problem unstable_spec_message unless versioned_unstable_spec.include?(formula.name)
end
end
throttled = %w[