diff options
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/os/mac/ruby_mach.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Library/Homebrew/os/mac/ruby_mach.rb b/Library/Homebrew/os/mac/ruby_mach.rb index 3cd0ac0b9..adef7b661 100644 --- a/Library/Homebrew/os/mac/ruby_mach.rb +++ b/Library/Homebrew/os/mac/ruby_mach.rb @@ -41,7 +41,15 @@ module RubyMachO end mach_data + rescue MachO::NotAMachOError + # Silently ignore errors that indicate the file is not a Mach-O binary ... + [] rescue + # ... but complain about other (parse) errors for further investigation. + if ARGV.homebrew_developer? + onoe "Failed to read Mach-O binary: #{self}" + raise + end [] end end |
