aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/utils/git.rb
diff options
context:
space:
mode:
authorXu Cheng2015-09-09 12:21:08 +0800
committerXu Cheng2015-09-09 12:21:08 +0800
commitc8efb058267b3500ee5c40ebf58de3feea8841a5 (patch)
treeebc8a8b44bdb25634bf8060e8a1a86c5925bf13a /Library/Homebrew/utils/git.rb
parentbff03ee5bac3a22c1fb668237db41ce1892d83c3 (diff)
downloadbrew-c8efb058267b3500ee5c40ebf58de3feea8841a5.tar.bz2
doctor: use Utils.git_available? instead of git?
Diffstat (limited to 'Library/Homebrew/utils/git.rb')
-rw-r--r--Library/Homebrew/utils/git.rb3
1 files changed, 2 insertions, 1 deletions
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