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
commite7d031fa42b64bffb3186b103b797e3497d2e3a2 (patch)
treebdaa0e4799d99ed3b925c4fbf6d5ab301c41ad00 /Library
parent1754403f9818a7b4bed696b794296bd4316371f0 (diff)
downloadhomebrew-e7d031fa42b64bffb3186b103b797e3497d2e3a2.tar.bz2
mdfind: Handle multiple results
Turns out mdfind can return multiple results on the commandline, if more than one app bundle matches. Fixes #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