mirror of
https://gitee.com/mirrors/ohmyzsh.git
synced 2026-10-15 15:16:45 +08:00
Cancel update if the current user doesn't have write permissions for the oh-my-zsh directory.
This commit is contained in:
1 parent
357ab4912b
commit
152e1e07e0
1 file changed
+7
@@ -26,6 +26,13 @@ if [ -f ~/.zsh-update ]
|
|||||||
then
|
then
|
||||||
. ~/.zsh-update
|
. ~/.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
|
if [[ -z "$LAST_EPOCH" ]]; then
|
||||||
_update_zsh_update && return 0;
|
_update_zsh_update && return 0;
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in new issue
Block a user