doctor: Mono-specific warning for pkg-config
Mono installs its own pkg-config symlink into /usr/bin/pkg-config, which breaks non-Mono builds. Provide a specific warning. Closes Homebrew/homebrew#12859.
This commit is contained in:
parent
2cca8e1a4f
commit
6229a20db7
@ -463,7 +463,15 @@ def check_which_pkg_config
|
||||
binary = which 'pkg-config'
|
||||
return if binary.nil?
|
||||
|
||||
unless binary.to_s == "#{HOMEBREW_PREFIX}/bin/pkg-config" then <<-EOS.undent
|
||||
mono_config = Pathname.new("/usr/bin/pkg-config")
|
||||
if mono_config.exist? && mono_config.realpath.to_s.include?("Mono.framework") then <<-EOS.undent
|
||||
You have a non-Homebrew 'pkg-config' in your PATH:
|
||||
/usr/bin/pkg-config => #{mono_config.realpath}
|
||||
|
||||
This was most likely created by the Mono installer. `./configure` may
|
||||
have problems finding brew-installed packages using this other pkg-config.
|
||||
EOS
|
||||
elsif binary.to_s != "#{HOMEBREW_PREFIX}/bin/pkg-config" then <<-EOS.undent
|
||||
You have a non-Homebrew 'pkg-config' in your PATH:
|
||||
#{binary}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user