From e07adf16198f0cd89d61ab4e6b50348417949308 Mon Sep 17 00:00:00 2001 From: Xu Cheng Date: Thu, 26 Nov 2015 19:55:18 +0800 Subject: [PATCH] GitRequirement: use Utils.git_available? `which("git")` will return incorrect result for OS X without Xcode/CLT installed, where `/usr/bin/git` is a stub. Closes Homebrew/homebrew#46386. Signed-off-by: Xu Cheng --- Library/Homebrew/requirements.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Library/Homebrew/requirements.rb b/Library/Homebrew/requirements.rb index 017cf945e9..843539a9a0 100644 --- a/Library/Homebrew/requirements.rb +++ b/Library/Homebrew/requirements.rb @@ -122,6 +122,6 @@ end class GitRequirement < Requirement fatal true default_formula "git" - satisfy { !!which("git") } + satisfy { Utils.git_available? } end