Use full paths to mdfind and pkgutil

This commit is contained in:
Max Howell 2012-08-27 12:36:50 -04:00
parent b8a62d98e1
commit 0509406069

View File

@ -216,12 +216,12 @@ module MacOS extend self
end end
def mdfind attribute, id def mdfind attribute, id
path = `mdfind "#{attribute} == '#{id}'"`.split("\n").first path = `/usr/bin/mdfind "#{attribute} == '#{id}'"`.split("\n").first
Pathname.new(path) unless path.nil? or path.empty? Pathname.new(path) unless path.nil? or path.empty?
end end
def pkgutil_info id def pkgutil_info id
`pkgutil --pkg-info #{id} 2>/dev/null`.strip `/usr/sbin/pkgutil --pkg-info "#{id}" 2>/dev/null`.strip
end end
def bottles_supported? def bottles_supported?