aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorDominyk Tiller2015-08-25 04:18:46 +0100
committerDominyk Tiller2015-08-25 04:18:46 +0100
commitb808eed08f3b3ef34085c6119112ca860f61e455 (patch)
tree49edf50f9a1f5c439ed1449f152c842e64f4f768 /Library
parent98bb638f29786cea209ee78f5caa7dda354e6ea5 (diff)
downloadbrew-b808eed08f3b3ef34085c6119112ca860f61e455.tar.bz2
formula: use which over locate
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/formula.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index c9e931311..0e3830e1f 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -768,12 +768,12 @@ class Formula
# New Homebrew installs may not be a git repo yet
return false unless File.exist? "#{HOMEBREW_PREFIX}/.git"
- git = MacOS.locate("git")
+ git = which("git")
# git isn't installed by older Xcodes
return false if git.nil?
# /usr/bin/git is a popup stub when Xcode/CLT aren't installed, so bail out
- return false if git.dirname.to_s == "/usr/bin" && !MacOS.has_apple_developer_tools?
+ return false if git == "/usr/bin/git" && !MacOS.has_apple_developer_tools?
path.parent.cd do
diff = Utils.popen_read("git", "diff", "origin/master", "--", "#{path}")