From 8c7ac47c854932113f7badad3af191b9cf4d6378 Mon Sep 17 00:00:00 2001 From: Adam Vandenberg Date: Mon, 28 Mar 2011 11:57:57 -0700 Subject: [PATCH] brew doctor - add check for CLICOLOR_FORCE --- Library/Homebrew/cmd/doctor.rb | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb index 37182fc28c..9ff4db57b2 100644 --- a/Library/Homebrew/cmd/doctor.rb +++ b/Library/Homebrew/cmd/doctor.rb @@ -543,9 +543,9 @@ def check_for_linked_kegonly_brews end end -def check_for_other_vars +def check_for_MACOSX_DEPLOYMENT_TARGET target_var = ENV['MACOSX_DEPLOYMENT_TARGET'] - return if target_var.nil? or target_var.empty? + return if target_var.to_s.empty? unless target_var == MACOS_VERSION.to_s puts <<-EOS.undent @@ -558,6 +558,19 @@ def check_for_other_vars end end +def check_for_CLICOLOR_FORCE + target_var = ENV['CLICOLOR_FORCE'] + return if target_var.to_s.empty? + + unless target_var == MACOS_VERSION.to_s + puts <<-EOS.undent + $CLICOLOR_FORCE was set to #{target_var} + Having $CLICOLOR_FORCE set can cause git installs to fail. + + EOS + end +end + def check_for_other_frameworks # Other frameworks that are known to cause problems when present if File.exist? "/Library/Frameworks/expat.framework" @@ -600,7 +613,8 @@ module Homebrew extend self check_for_gettext check_for_config_scripts check_for_dyld_vars - check_for_other_vars + check_for_MACOSX_DEPLOYMENT_TARGET + check_for_CLICOLOR_FORCE check_for_symlinked_cellar check_for_multiple_volumes check_for_git