mdfind: Check if path is nil as well as empty
This commit is contained in:
parent
9af7e25e03
commit
fcbee28447
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user