aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/formula.rb
diff options
context:
space:
mode:
authorMisty De Meo2015-08-21 11:04:22 -0700
committerMisty De Meo2015-08-21 11:04:22 -0700
commit727239e12f98fafad39aa4f70b37c6d5bf4db1cc (patch)
tree6019e597c18c9ea366e7e45be0a3e6fc19335ae1 /Library/Homebrew/formula.rb
parent1da2855c0b1d884d18944307bdbbe2b64c4dd47d (diff)
parent04a0b2aafe2062701be4028f408d0bee15f3815d (diff)
downloadbrew-727239e12f98fafad39aa4f70b37c6d5bf4db1cc.tar.bz2
Merge bottle install without Xcode branch
Merge branch 'bottle_hooks'
Diffstat (limited to 'Library/Homebrew/formula.rb')
-rw-r--r--Library/Homebrew/formula.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index 8fb220ba8..278cf6595 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -741,7 +741,11 @@ class Formula
end
def file_modified?
- return false unless which("git")
+ git_dir = MacOS.locate("git").dirname.to_s
+
+ # /usr/bin/git is a popup stub when Xcode/CLT aren't installed, so bail out
+ return false if git_dir == "/usr/bin" && !MacOS.has_apple_developer_tools?
+
path.parent.cd do
diff = Utils.popen_read("git", "diff", "origin/master", "--", "#{path}")
!diff.empty? && $?.exitstatus == 0