Skip to content
Snippets Groups Projects
Commit 06fe347d authored by Martin Afanasjew's avatar Martin Afanasjew
Browse files

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.
parent 0c6e307e
No related branches found
No related tags found
No related merge requests found
......@@ -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?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment