summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/check_for_upgrade.sh6
1 files changed, 6 insertions, 0 deletions
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