b3c10b925e25e2d53c1a6e4dcaead30547c7ec7a

Author
Marc Cornellà <marc.cornella@live.com>
Committer
Marc Cornellà <marc.cornella@live.com>
Date

Message

Merge pull request #4505 from arvindch/checked-upgrade

Check for git before trying to upgrade OMZ

Diff

 1diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh
 2index 5afd83c1e18da0bbd015c1aff308925f749a395c..1c897cb36a7a3daf7a21e97580cc7da5283b96e9 100644
 3--- a/tools/check_for_upgrade.sh
 4+++ b/tools/check_for_upgrade.sh
 5@@ -26,6 +26,9 @@ fi
 6 # oh-my-zsh directory.
 7 [[ -w "$ZSH" ]] || return 0
 8 
 9+# Cancel upgrade if git is unavailable on the system
10+whence git >/dev/null || return 0
11+
12 if [ -f ~/.zsh-update ]
13 then
14   . ~/.zsh-update
15@@ -54,4 +57,3 @@ else
16   # create the zsh file
17   _update_zsh_update
18 fi
19-