From a008b0b98713c2837de34aac33bfff4690b38d0e Mon Sep 17 00:00:00 2001 From: "n.st" Date: Wed, 4 Jun 2014 19:26:46 +0200 Subject: [PATCH] Cancel upgrade if the current user doesn't have write permissions for the oh-my-zsh directory. --- tools/check_for_upgrade.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh index 0f8c9c391..5a7ed3515 100644 --- a/tools/check_for_upgrade.sh +++ b/tools/check_for_upgrade.sh @@ -22,6 +22,10 @@ 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