From e8eb781470df7463ca2147862d257815f5062314 Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Wed, 13 Oct 2021 16:54:02 +0800 Subject: [PATCH] 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 --- Library/Homebrew/extend/os/mac/formula_cellar_checks.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/extend/os/mac/formula_cellar_checks.rb b/Library/Homebrew/extend/os/mac/formula_cellar_checks.rb index ab9042331a..3c297e1849 100644 --- a/Library/Homebrew/extend/os/mac/formula_cellar_checks.rb +++ b/Library/Homebrew/extend/os/mac/formula_cellar_checks.rb @@ -41,7 +41,7 @@ module FormulaCellarChecks These object files were linked against the deprecated system OpenSSL or the system's private LibreSSL. Adding `depends_on "openssl"` to the formula may help. - #{system_openssl * "\n "} + #{system_openssl * "\n "} EOS end @@ -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?