diff options
| author | Xu Cheng | 2015-09-09 12:21:08 +0800 |
|---|---|---|
| committer | Xu Cheng | 2015-09-09 12:21:08 +0800 |
| commit | c8efb058267b3500ee5c40ebf58de3feea8841a5 (patch) | |
| tree | ebc8a8b44bdb25634bf8060e8a1a86c5925bf13a /Library/Homebrew/utils/git.rb | |
| parent | bff03ee5bac3a22c1fb668237db41ce1892d83c3 (diff) | |
| download | brew-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.rb | 3 |
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 |
