Merge pull request #13918 from carlocab/fix_gcc_dependency

formula_auditor: fix false negatives in `audit_gcc_dependency`
This commit is contained in:
Carlo Cabrera 2022-09-23 06:25:37 +08:00 committed by GitHub
commit 4441452f4e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -892,8 +892,9 @@ module Homebrew
# This variation either:
# 1. does not exist
# 2. has no variation-specific dependencies
# In either case, it matches Linux.
return false if variation_dependencies.blank?
# In either case, it matches Linux. We must check for `nil` because an empty
# array indicates that this variation does not depend on GCC.
return false if variation_dependencies.nil?
# We found a non-Linux variation that depends on GCC.
return false if variation_dependencies.include?("gcc")
end