From d70a406fe7a8820634adf217c9962d613ffe4cc0 Mon Sep 17 00:00:00 2001 From: Dominyk Tiller Date: Mon, 11 Dec 2017 06:26:56 +0000 Subject: [PATCH] caveats: fix PKG_CONFIG_PATH nudge under env filtering --- Library/Homebrew/caveats.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/caveats.rb b/Library/Homebrew/caveats.rb index 49a517bd49295..98321f1a1aa4e 100644 --- a/Library/Homebrew/caveats.rb +++ b/Library/Homebrew/caveats.rb @@ -64,7 +64,7 @@ def keg_only_text s << "\nFor compilers to find this software you may need to set:\n" s << " LDFLAGS: -L#{f.opt_lib}\n" if f.lib.directory? s << " CPPFLAGS: -I#{f.opt_include}\n" if f.include.directory? - if which("pkg-config") && + if which("pkg-config", ENV["HOMEBREW_PATH"]) && ((f.lib/"pkgconfig").directory? || (f.share/"pkgconfig").directory?) s << "For pkg-config to find this software you may need to set:\n" s << " PKG_CONFIG_PATH: #{f.opt_lib}/pkgconfig\n" if (f.lib/"pkgconfig").directory?