summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Cornellà <marc.cornella@live.com>2015-10-20 23:29:00 +0200
committerMarc Cornellà <marc.cornella@live.com>2015-10-20 23:29:00 +0200
commitb3c10b925e25e2d53c1a6e4dcaead30547c7ec7a (patch)
tree024e25fc0117e16deb4f0035cd6104e19add7a67
parente0c9ada3807572768634c3b585577d236b61306d (diff)
parente59e1c8417513a246509f7738ae05b4f2c9a8a8e (diff)
downloadzsh-b3c10b925e25e2d53c1a6e4dcaead30547c7ec7a.tar.gz
zsh-b3c10b925e25e2d53c1a6e4dcaead30547c7ec7a.tar.bz2
zsh-b3c10b925e25e2d53c1a6e4dcaead30547c7ec7a.zip
Merge pull request #4505 from arvindch/checked-upgrade
Check for git before trying to upgrade OMZ
-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
-