mac/formula_cellar_checks: apply suggestions from code review
- Fix missing space - use `MachO::Utils.fat_magic?` - call `#flag?` consistently. Co-authored-by: Bo Anderson <mail@boanderson.me>
This commit is contained in:
parent
4fbe0a2b1b
commit
e8eb781470
@ -97,10 +97,10 @@ module FormulaCellarChecks
|
||||
next true unless file.dylib?
|
||||
|
||||
macho = MachO.open(file)
|
||||
if file.universal?
|
||||
if MachO::Utils.fat_magic?(macho.magic)
|
||||
macho.machos.map(&:header).all? { |h| h.flag? :MH_TWOLEVEL }
|
||||
else
|
||||
macho.header.flag?(:MH_TWOLEVEL)
|
||||
macho.header.flag? :MH_TWOLEVEL
|
||||
end
|
||||
end
|
||||
return if flat_namespace_files.empty?
|
||||
|
Loading…
x
Reference in New Issue
Block a user