From 1d463304c4de85fb2b9e464fab1952c38d88db2a Mon Sep 17 00:00:00 2001 From: Chris Ross Date: Fri, 16 Oct 2015 15:25:17 -0400 Subject: [PATCH] Avoid an attempt to update if git isn't available, as it will only fail. --- tools/check_for_upgrade.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh index 5afd83c1e..c3b376d66 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 no git command is available on this system. +whence git >/dev/null || return 0 + if [ -f ~/.zsh-update ] then . ~/.zsh-update