diff options
author | Robby Russell <robby@planetargon.com> | 2013-12-18 17:01:01 -0800 |
---|---|---|
committer | Robby Russell <robby@planetargon.com> | 2013-12-18 17:01:01 -0800 |
commit | c9e5adb637c0220a471c2ec4f0fb0f4195fcfb35 (patch) | |
tree | 50f5ce08e096d19c83e1d4aba78283cd383efe2b | |
parent | 357ab4912b98e5ffc14dd62a53b988053d7f9a6e (diff) | |
parent | 152e1e07e0397ecc3f1778ea597d081c33ee8ff4 (diff) | |
download | zsh-c9e5adb637c0220a471c2ec4f0fb0f4195fcfb35.tar.gz zsh-c9e5adb637c0220a471c2ec4f0fb0f4195fcfb35.tar.bz2 zsh-c9e5adb637c0220a471c2ec4f0fb0f4195fcfb35.zip |
Merge pull request #2358 from n-st/master
Cancel update if the current user doesn't have write permissions for the oh-my-zsh directory.
-rw-r--r-- | tools/check_for_upgrade.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh index 0f8c9c391..d877e2a89 100644 --- a/tools/check_for_upgrade.sh +++ b/tools/check_for_upgrade.sh @@ -26,6 +26,13 @@ if [ -f ~/.zsh-update ] then . ~/.zsh-update + # cancel update if the current user doesn't have write permissions for the + # oh-my-zsh directory + if [ -n $(find -not -writable "$ZSH") ] + then + return 0; + fi + if [[ -z "$LAST_EPOCH" ]]; then _update_zsh_update && return 0; fi |