From 02e5f8ed6b9618023e8adb372f8431e63e9666ba Mon Sep 17 00:00:00 2001
From: Mike McQuaid <mike@mikemcquaid.com>
Date: Thu, 11 Dec 2014 13:23:44 +0000
Subject: [PATCH] mach: handle empty otool output.

---
 Library/Homebrew/mach.rb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Library/Homebrew/mach.rb b/Library/Homebrew/mach.rb
index 8da667acd7..0a0a3e2896 100644
--- a/Library/Homebrew/mach.rb
+++ b/Library/Homebrew/mach.rb
@@ -155,6 +155,7 @@ 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?
 
       libs.shift # first line is the filename
 
-- 
GitLab