We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
sh
-O
1 parent f9e254e commit 3fa9d53Copy full SHA for 3fa9d53
nvm.sh
@@ -2985,7 +2985,8 @@ nvm_check_file_permissions() {
2985
if [ ! -L "${FILE}" ] && ! nvm_check_file_permissions "${FILE}"; then
2986
return 2
2987
fi
2988
- elif [ -e "$FILE" ] && [ ! -w "$FILE" ] && [ ! -O "$FILE" ]; then
+ elif [ -e "$FILE" ] && [ ! -w "$FILE" ] && [ -z "$(command find "${FILE}" -prune -user "$(command id -u)")" ]; then
2989
+ # ^ file ownership check from https://www.shellcheck.net/wiki/SC3067
2990
nvm_err "file is not writable or self-owned: $(nvm_sanitize_path "$FILE")"
2991
return 1
2992
0 commit comments