diff options
| author | Mike McQuaid | 2014-12-11 13:59:12 +0000 |
|---|---|---|
| committer | Mike McQuaid | 2014-12-11 13:59:12 +0000 |
| commit | f478afb8539b3ba94caf3b2ed04fa4fa83628d6a (patch) | |
| tree | b787e2f0510ac1262947960a57bf1191ec9a8cda /Library | |
| parent | bb25e84974f3a3ced6a10c9e55668233433e99a1 (diff) | |
| download | homebrew-f478afb8539b3ba94caf3b2ed04fa4fa83628d6a.tar.bz2 | |
mach: improve otool failure handling.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/mach.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Library/Homebrew/mach.rb b/Library/Homebrew/mach.rb index 0a0a3e289..d63edc6fe 100644 --- a/Library/Homebrew/mach.rb +++ b/Library/Homebrew/mach.rb @@ -155,7 +155,10 @@ module MachO def parse_otool_L_output ENV["HOMEBREW_MACH_O_FILE"] = path.expand_path.to_s libs = `#{MacOS.locate("otool")} -L "$HOMEBREW_MACH_O_FILE"`.split("\n") - return nil, [] if libs.empty? + unless $?.success? + raise ErrorDuringExecution.new(MacOS.locate("otool"), + ["-L", ENV["HOMEBREW_MACH_O_FILE"]]) + end libs.shift # first line is the filename |
