Use MacOS.locate to find otool

Fixes Homebrew/homebrew#23111.
This commit is contained in:
Jack Nagel 2013-10-07 21:25:20 -05:00
parent 022f1225e6
commit fe31e8ddb4

View File

@ -396,7 +396,7 @@ class Pathname
# Returns an empty array both for software that links against no libraries, # Returns an empty array both for software that links against no libraries,
# and for non-mach objects. # and for non-mach objects.
def dynamically_linked_libraries 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] line[/\t(.+) \([^(]+\)/, 1]
end end
end end