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