Merge pull request #5830 from sjackman/audit-provided-by-macos-on-linux

audit: Keg-only :provided_by_macos dep okay on Linux
This commit is contained in:
Shaun Jackman 2019-03-02 14:03:49 -08:00 committed by GitHub
commit 6c78b267ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -386,10 +386,10 @@ module Homebrew
problem "Dependency '#{dep.name}' is an alias; use the canonical name '#{dep.to_formula.full_name}'."
end
if @new_formula && dep_f.keg_only_reason &&
!["openssl", "apr", "apr-util"].include?(dep.name) &&
!["openblas"].include?(dep.name) &&
dep_f.keg_only_reason.reason == :provided_by_macos
if @new_formula &&
dep_f.keg_only_reason&.reason == :provided_by_macos &&
dep_f.keg_only_reason.valid? &&
!["apr", "apr-util", "openblas", "openssl"].include?(dep.name)
new_formula_problem(
"Dependency '#{dep.name}' may be unnecessary as it is provided " \
"by macOS; try to build this formula without it.",

View File

@ -252,7 +252,7 @@ module Homebrew
its(:problems) { are_expected.to be_empty }
end
describe "which is not whitelisted" do
describe "which is not whitelisted", :needs_macos do
subject { fa }
let(:fa) do