aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMisty De Meo2012-07-30 23:20:05 -0300
committerMisty De Meo2012-07-30 23:20:05 -0300
commit2056e24a12a48b9776e78992cfe77494d64ca3f8 (patch)
tree586cd1450b4c2383d318b5c8d9cf38baba7c8fe7 /Library
parentd5f2cdd31cda2791922cf42f3716fbec6d442bc8 (diff)
downloadbrew-2056e24a12a48b9776e78992cfe77494d64ca3f8.tar.bz2
mdfind: Handle multiple results
Turns out mdfind can return multiple results on the commandline, if more than one app bundle matches. Fixes Homebrew/homebrew#13789.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/macos.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/Library/Homebrew/macos.rb b/Library/Homebrew/macos.rb
index 80f8b3d2d..0441c26f2 100644
--- a/Library/Homebrew/macos.rb
+++ b/Library/Homebrew/macos.rb
@@ -269,7 +269,7 @@ module MacOS extend self
end
def mdfind attribute, id
- path = `mdfind "#{attribute} == '#{id}'"`.strip
+ path = `mdfind "#{attribute} == '#{id}'"`.split("\n").first.strip
Pathname.new(path) unless path.empty?
end