aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMisty De Meo2012-07-31 00:14:52 -0300
committerMisty De Meo2012-07-31 00:14:52 -0300
commitfcbee284474e69edf6d91030672236426c1ca4a7 (patch)
tree6b3e21de7757d5db48c8c78d3a04ec176cfb7556
parent9af7e25e034e1e109f02d6ad7642c424f1e54ff1 (diff)
downloadbrew-fcbee284474e69edf6d91030672236426c1ca4a7.tar.bz2
mdfind: Check if path is nil as well as empty
-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 da179de31..d44b7627a 100644
--- a/Library/Homebrew/macos.rb
+++ b/Library/Homebrew/macos.rb
@@ -270,7 +270,7 @@ module MacOS extend self
def mdfind attribute, id
path = `mdfind "#{attribute} == '#{id}'"`.split("\n").first
- Pathname.new(path) unless path.empty?
+ Pathname.new(path) unless path.nil? or path.empty?
end
def pkgutil_info id