summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorArvind Chembarpu <achembarpu@gmail.com>2015-10-16 23:19:55 +0530
committerArvind Chembarpu <achembarpu@gmail.com>2015-10-16 23:19:55 +0530
commite59e1c8417513a246509f7738ae05b4f2c9a8a8e (patch)
tree2436e078e0a04a3be91ab5f960282ab401e64722 /tools
parentaa15ebad3e9c86fbd8dd5f01803066f82ece9593 (diff)
downloadzsh-e59e1c8417513a246509f7738ae05b4f2c9a8a8e.tar.gz
zsh-e59e1c8417513a246509f7738ae05b4f2c9a8a8e.tar.bz2
zsh-e59e1c8417513a246509f7738ae05b4f2c9a8a8e.zip
Check for git before trying to upgrade, as per #4504
Diffstat (limited to 'tools')
-rw-r--r--tools/check_for_upgrade.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh
index 5afd83c1e..1c897cb36 100644
--- a/tools/check_for_upgrade.sh
+++ b/tools/check_for_upgrade.sh
@@ -26,6 +26,9 @@ fi
# oh-my-zsh directory.
[[ -w "$ZSH" ]] || return 0
+# Cancel upgrade if git is unavailable on the system
+whence git >/dev/null || return 0
+
if [ -f ~/.zsh-update ]
then
. ~/.zsh-update
@@ -54,4 +57,3 @@ else
# create the zsh file
_update_zsh_update
fi
-