Fix logic in check_binary_arches
This commit is contained in:
parent
7b74730f9d
commit
1678a3785e
@ -323,14 +323,15 @@ module FormulaCellarChecks
|
|||||||
mismatches = keg.binary_executable_or_library_files.reject do |file|
|
mismatches = keg.binary_executable_or_library_files.reject do |file|
|
||||||
file.arch == Hardware::CPU.arch
|
file.arch == Hardware::CPU.arch
|
||||||
end
|
end
|
||||||
|
return if mismatches.empty?
|
||||||
|
|
||||||
compatible_universal_binaries = mismatches.select do |file|
|
compatible_universal_binaries = mismatches.select do |file|
|
||||||
file.arch == :universal && file.archs.include?(Hardware::CPU.arch)
|
file.arch == :universal && file.archs.include?(Hardware::CPU.arch)
|
||||||
end
|
end
|
||||||
mismatches -= compatible_universal_binaries
|
mismatches -= compatible_universal_binaries
|
||||||
|
|
||||||
return if mismatches.empty? && compatible_universal_binaries.empty?
|
universal_binaries_expected = tap_audit_exception(:universal_binary_allowlist, formula.name)
|
||||||
return if mismatches.empty? && tap_audit_exception(:universal_binary_allowlist, formula.name)
|
return if mismatches.empty? && universal_binaries_expected
|
||||||
|
|
||||||
s = ""
|
s = ""
|
||||||
|
|
||||||
@ -342,7 +343,7 @@ module FormulaCellarChecks
|
|||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
|
|
||||||
unless compatible_universal_binaries.empty?
|
if !compatible_universal_binaries.empty? && !universal_binaries_expected
|
||||||
s += <<~EOS
|
s += <<~EOS
|
||||||
Unexpected universal binaries were found.
|
Unexpected universal binaries were found.
|
||||||
The offending files are:
|
The offending files are:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user