Skip to content
Snippets Groups Projects
Commit 9e2fc82a authored by Jack Nagel's avatar Jack Nagel
Browse files

Use which method in doctor


Signed-off-by: default avatarJack Nagel <jacknagel@gmail.com>
parent 0c14036a
No related branches found
No related tags found
No related merge requests found
......@@ -457,23 +457,22 @@ def check_user_path_3
end
def check_which_pkg_config
binary = `/usr/bin/which pkg-config`.chomp
return if binary.empty?
binary = which 'pkg-config'
return if binary.nil?
unless binary == "#{HOMEBREW_PREFIX}/bin/pkg-config"
<<-EOS.undent
You have a non-brew 'pkg-config' in your PATH:
#{binary}
unless binary.to_s == "#{HOMEBREW_PREFIX}/bin/pkg-config" then <<-EOS.undent
You have a non-Homebrew 'pkg-config' in your PATH:
#{binary}
`./configure` may have problems finding brew-installed packages using
this other pkg-config.
`./configure` may have problems finding brew-installed packages using
this other pkg-config.
EOS
end
end
def check_pkg_config_paths
binary = `/usr/bin/which pkg-config`.chomp
return if binary.empty?
binary = which 'pkg-config'
return if binary.nil?
pkg_config_paths = `pkg-config --variable pc_path pkg-config`.chomp.split(':')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment