[Fix] allow uninstalls when files are nonwritable but self-owned.
Fixes #1270.
parent
eab41ed8ef
commit
e5316ddbe3
4
nvm.sh
4
nvm.sh
|
@ -2090,8 +2090,8 @@ nvm_check_file_permissions() {
|
||||||
fi
|
fi
|
||||||
return 2
|
return 2
|
||||||
fi
|
fi
|
||||||
elif [ -e "$FILE" ] && [ ! -w "$FILE" ]; then
|
elif [ -e "$FILE" ] && [ ! -w "$FILE" ] && [ ! -O "$FILE" ]; then
|
||||||
nvm_err "file is not writable: $(nvm_sanitize_path "$FILE")"
|
nvm_err "file is not writable or self-owned: $(nvm_sanitize_path "$FILE")"
|
||||||
if [ "${ZSH_HAS_NONOMATCH_UNSET}" -eq 1 ] && nvm_has "setopt"; then
|
if [ "${ZSH_HAS_NONOMATCH_UNSET}" -eq 1 ] && nvm_has "setopt"; then
|
||||||
setopt nomatch
|
setopt nomatch
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue