diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh index 881bc6c49..223812121 100644 --- a/tools/check_for_upgrade.sh +++ b/tools/check_for_upgrade.sh @@ -29,6 +29,10 @@ fi # Cancel upgrade if git is unavailable on the system whence git >/dev/null || return 0 +# Cancel upgrade if the current user doesn't have write permissions for the +# oh-my-zsh directory. +[[ -w "$ZSH" ]] || return 0 + if [ -f ~/.zsh-update ] then . ~/.zsh-update