From fcbee284474e69edf6d91030672236426c1ca4a7 Mon Sep 17 00:00:00 2001 From: Misty De Meo Date: Tue, 31 Jul 2012 00:14:52 -0300 Subject: [PATCH] mdfind: Check if path is nil as well as empty --- Library/Homebrew/macos.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/macos.rb b/Library/Homebrew/macos.rb index da179de310..d44b7627ab 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