Enforce universal binary check only for Homebrew/core
Also, prefer `if` to `unless`.
This commit is contained in:
parent
55cc1eb8b0
commit
239fd06728
@ -330,13 +330,15 @@ module FormulaCellarChecks
|
|||||||
end
|
end
|
||||||
mismatches -= compatible_universal_binaries
|
mismatches -= compatible_universal_binaries
|
||||||
|
|
||||||
universal_binaries_expected =
|
universal_binaries_expected = true
|
||||||
formula.tap.present? && tap_audit_exception(:universal_binary_allowlist, formula.name)
|
universal_binaries_expected = if formula.tap.present? && formula.tap.core_tap?
|
||||||
|
tap_audit_exception(:universal_binary_allowlist, formula.name)
|
||||||
|
end
|
||||||
return if mismatches.empty? && universal_binaries_expected
|
return if mismatches.empty? && universal_binaries_expected
|
||||||
|
|
||||||
s = ""
|
s = ""
|
||||||
|
|
||||||
unless mismatches.empty?
|
if mismatches.any?
|
||||||
s += <<~EOS
|
s += <<~EOS
|
||||||
Binaries built for an incompatible architecture were installed into #{formula}'s prefix.
|
Binaries built for an incompatible architecture were installed into #{formula}'s prefix.
|
||||||
The offending files are:
|
The offending files are:
|
||||||
@ -344,7 +346,7 @@ module FormulaCellarChecks
|
|||||||
EOS
|
EOS
|
||||||
end
|
end
|
||||||
|
|
||||||
if !compatible_universal_binaries.empty? && !universal_binaries_expected
|
if compatible_universal_binaries.any? && !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