From fe31e8ddb4803c3e549af936b7f7b30b754660db Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Mon, 7 Oct 2013 21:25:20 -0500 Subject: [PATCH] Use MacOS.locate to find otool Fixes Homebrew/homebrew#23111. --- Library/Homebrew/extend/pathname.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/extend/pathname.rb b/Library/Homebrew/extend/pathname.rb index d54e7d72f9..0edd1bd06d 100644 --- a/Library/Homebrew/extend/pathname.rb +++ b/Library/Homebrew/extend/pathname.rb @@ -396,7 +396,7 @@ class Pathname # Returns an empty array both for software that links against no libraries, # and for non-mach objects. def dynamically_linked_libraries - `otool -L "#{expand_path}"`.chomp.split("\n")[1..-1].map do |line| + `#{MacOS.locate("otool")} -L "#{expand_path}"`.chomp.split("\n")[1..-1].map do |line| line[/\t(.+) \([^(]+\)/, 1] end end