aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
authorJack Nagel2012-06-12 00:17:36 -0500
committerJack Nagel2012-06-12 00:17:36 -0500
commit9e2fc82ad66f8efc280df4b303ed5c8d4e890301 (patch)
treec93d6f578f9cfaa9a2e7dd451d509506ef986008 /Library/Homebrew/cmd
parent0c14036a9af95ff47385ed4cf15e693374e6db08 (diff)
downloadbrew-9e2fc82ad66f8efc280df4b303ed5c8d4e890301.tar.bz2
Use which method in doctor
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/doctor.rb19
1 files changed, 9 insertions, 10 deletions
diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb
index f22e57e92..ea7c1f8c4 100644
--- a/Library/Homebrew/cmd/doctor.rb
+++ b/Library/Homebrew/cmd/doctor.rb
@@ -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(':')