Use which method in doctor
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
This commit is contained in:
		
							parent
							
								
									0c14036a9a
								
							
						
					
					
						commit
						9e2fc82ad6
					
				@ -457,12 +457,11 @@ def check_user_path_3
 | 
				
			|||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def check_which_pkg_config
 | 
					def check_which_pkg_config
 | 
				
			||||||
  binary = `/usr/bin/which pkg-config`.chomp
 | 
					  binary = which 'pkg-config'
 | 
				
			||||||
  return if binary.empty?
 | 
					  return if binary.nil?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  unless binary == "#{HOMEBREW_PREFIX}/bin/pkg-config"
 | 
					  unless binary.to_s == "#{HOMEBREW_PREFIX}/bin/pkg-config" then <<-EOS.undent
 | 
				
			||||||
    <<-EOS.undent
 | 
					    You have a non-Homebrew 'pkg-config' in your PATH:
 | 
				
			||||||
      You have a non-brew 'pkg-config' in your PATH:
 | 
					 | 
				
			||||||
      #{binary}
 | 
					      #{binary}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    `./configure` may have problems finding brew-installed packages using
 | 
					    `./configure` may have problems finding brew-installed packages using
 | 
				
			||||||
@ -472,8 +471,8 @@ def check_which_pkg_config
 | 
				
			|||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def check_pkg_config_paths
 | 
					def check_pkg_config_paths
 | 
				
			||||||
  binary = `/usr/bin/which pkg-config`.chomp
 | 
					  binary = which 'pkg-config'
 | 
				
			||||||
  return if binary.empty?
 | 
					  return if binary.nil?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  pkg_config_paths = `pkg-config --variable pc_path pkg-config`.chomp.split(':')
 | 
					  pkg_config_paths = `pkg-config --variable pc_path pkg-config`.chomp.split(':')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user