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