diff options
| author | Martin Afanasjew | 2016-08-10 17:56:46 +0200 |
|---|---|---|
| committer | Martin Afanasjew | 2016-08-10 17:56:46 +0200 |
| commit | 06fe347de97975dc01e726f87bf07a56a6fb713e (patch) | |
| tree | 4d1c3b7aa4355fd98bc2a857a4d29f1dd372f358 /Library/Homebrew/os | |
| parent | 0c6e307eef57c48d03e1213112d3edd597ce5a7b (diff) | |
| download | brew-06fe347de97975dc01e726f87bf07a56a6fb713e.tar.bz2 | |
os/mac/ruby_keg: improve error reporting
A failure to change a dylib ID or install name would previously cause a
rather cryptic error message, that didn't include the name of the file
that caused the failure, unless `--debug` was specified. Make sure to
output this information in all cases before re-raising the exception.
Diffstat (limited to 'Library/Homebrew/os')
| -rw-r--r-- | Library/Homebrew/os/mac/ruby_keg.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Library/Homebrew/os/mac/ruby_keg.rb b/Library/Homebrew/os/mac/ruby_keg.rb index f6fc33495..26babdc3d 100644 --- a/Library/Homebrew/os/mac/ruby_keg.rb +++ b/Library/Homebrew/os/mac/ruby_keg.rb @@ -5,12 +5,26 @@ module RubyKeg @require_install_name_tool = true puts "Changing dylib ID of #{file}\n from #{file.dylib_id}\n to #{id}" if ARGV.debug? MachO::Tools.change_dylib_id(file, id) + rescue MachO::MachOError + onoe <<-EOS.undent + Failed changing dylib ID of #{file} + from #{file.dylib_id} + to #{id} + EOS + raise end def change_install_name(old, new, file) @require_install_name_tool = true puts "Changing install name in #{file}\n from #{old}\n to #{new}" if ARGV.debug? MachO::Tools.change_install_name(file, old, new) + rescue MachO::MachOError + onoe <<-EOS.undent + Failed changing install name in #{file} + from #{old} + to #{new} + EOS + raise end def require_install_name_tool? |
