From c8efb058267b3500ee5c40ebf58de3feea8841a5 Mon Sep 17 00:00:00 2001 From: Xu Cheng Date: Wed, 9 Sep 2015 12:21:08 +0800 Subject: doctor: use Utils.git_available? instead of git? --- Library/Homebrew/utils/git.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Library/Homebrew/utils') diff --git a/Library/Homebrew/utils/git.rb b/Library/Homebrew/utils/git.rb index 774a0a65f..10dbc83c1 100644 --- a/Library/Homebrew/utils/git.rb +++ b/Library/Homebrew/utils/git.rb @@ -1,7 +1,8 @@ module Utils def self.git_available? return @git if instance_variable_defined?(:@git) - git = which("git") + # check git in original path in case it's the wrapper script of Library/ENV/scm + git = which("git", ORIGINAL_PATHS.join(File::PATH_SEPARATOR)) # git isn't installed by older Xcodes return @git = false if git.nil? # /usr/bin/git is a popup stub when Xcode/CLT aren't installed, so bail out -- cgit v1.2.3