diff options
| author | Misty De Meo | 2012-07-30 23:20:05 -0300 |
|---|---|---|
| committer | Misty De Meo | 2012-07-30 23:20:05 -0300 |
| commit | 2056e24a12a48b9776e78992cfe77494d64ca3f8 (patch) | |
| tree | 586cd1450b4c2383d318b5c8d9cf38baba7c8fe7 /Library/Homebrew | |
| parent | d5f2cdd31cda2791922cf42f3716fbec6d442bc8 (diff) | |
| download | brew-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/Homebrew')
| -rw-r--r-- | Library/Homebrew/macos.rb | 2 |
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 |
