Use full paths to mdfind and pkgutil
This commit is contained in:
		
							parent
							
								
									b8a62d98e1
								
							
						
					
					
						commit
						0509406069
					
				@ -216,12 +216,12 @@ module MacOS extend self
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  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?
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def pkgutil_info id
 | 
			
		||||
    `pkgutil --pkg-info #{id} 2>/dev/null`.strip
 | 
			
		||||
    `/usr/sbin/pkgutil --pkg-info "#{id}" 2>/dev/null`.strip
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  def bottles_supported?
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user