aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd
diff options
context:
space:
mode:
authorXu Cheng2016-04-02 18:41:44 +0800
committerXu Cheng2016-04-02 21:51:36 +0800
commit5560f5550d6692178e3bbce94e5dacdba192cd55 (patch)
tree6cb7b7aefbb26a9d03bab972e8cab22209e7adc2 /Library/Homebrew/cmd
parentdeea4c82a4e64e746465cd74ea80e9afbedd9a91 (diff)
downloadbrew-5560f5550d6692178e3bbce94e5dacdba192cd55.tar.bz2
git: check homebrew/core existence before installing brewed git
Diffstat (limited to 'Library/Homebrew/cmd')
-rw-r--r--Library/Homebrew/cmd/update.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/update.sh b/Library/Homebrew/cmd/update.sh
index 30cf94e13..d0da09575 100644
--- a/Library/Homebrew/cmd/update.sh
+++ b/Library/Homebrew/cmd/update.sh
@@ -258,7 +258,8 @@ EOS
if ! git --version >/dev/null 2>&1
then
- brew install git
+ # we cannot install brewed git if homebrew/core is unavailable.
+ [[ -d "$HOMEBREW_LIBRARY/Taps/homebrew/homebrew-core" ]] && brew install git
if ! git --version >/dev/null 2>&1
then
odie "Git must be installed and in your PATH!"