diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh index c5fd0cce1..8b8ecae03 100644 --- a/tools/check_for_upgrade.sh +++ b/tools/check_for_upgrade.sh @@ -20,6 +20,12 @@ if [[ -z "$epoch_target" ]]; then epoch_target=13 fi +[ -f ~/.profile ] && source ~/.profile + +# 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