From e59e1c8417513a246509f7738ae05b4f2c9a8a8e Mon Sep 17 00:00:00 2001 From: Arvind Chembarpu Date: Fri, 16 Oct 2015 23:19:55 +0530 Subject: [PATCH] Check for git before trying to upgrade, as per #4504 --- tools/check_for_upgrade.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -