aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMisty De Meo2013-03-04 15:30:59 -0600
committerMisty De Meo2013-07-08 22:49:35 -0700
commit3c567164a991d8611c2fd1c85311d011dde8515e (patch)
treeefbecd1c64627c6b05962045513743d2a2f0fa4e
parent8cc6d6d4135f25fda535d887004d19cab919d2d2 (diff)
downloadhomebrew-3c567164a991d8611c2fd1c85311d011dde8515e.tar.bz2
Don't try to install from git if git is too old
This came up in tigerbrew, where the install failed for a user with git 1.6.x: https://github.com/mistydemeo/tigerbrew/issues/9 TODO Given that this left the user with a chowned /usr/local but no functional homebrew install, there should still be better error handling here. Fixes mistydemeo/tigerbrew#9. Fixes #20945. Closes #18666.
-rw-r--r--install7
1 files changed, 7 insertions, 0 deletions
diff --git a/install b/install
index 6d13e1338..dc0266d92 100644
--- a/install
+++ b/install
@@ -76,6 +76,13 @@ def git
s = `xcrun -find git 2>/dev/null`.chomp
s if $? and not s.empty?
end
+
+ # Github only supports HTTPS fetches on 1.7.10 or later:
+ # https://help.github.com/articles/https-cloning-errors
+ `#{@git} --version` =~ /git version (\d\.\d+\.\d+)/
+ return if $1 < "1.7.10"
+
+ @git
end
# The block form of Dir.chdir fails later if Dir.CWD doesn't exist which I