aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike McQuaid2014-12-11 13:59:12 +0000
committerMike McQuaid2014-12-11 13:59:12 +0000
commit56e82c941efa6827a6095630bebbdcc5ad631ff7 (patch)
tree0fc656eab65cf46f3cc44981961ba52193250b5c
parent02e5f8ed6b9618023e8adb372f8431e63e9666ba (diff)
downloadbrew-56e82c941efa6827a6095630bebbdcc5ad631ff7.tar.bz2
mach: improve otool failure handling.
-rw-r--r--Library/Homebrew/mach.rb5
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