e59e1c8417513a246509f7738ae05b4f2c9a8a8e
- Author
- Arvind Chembarpu <achembarpu@gmail.com>
- Committer
- Arvind Chembarpu <achembarpu@gmail.com>
- Date
Message
Check for git before trying to upgrade, as per #4504
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-