[Perf] nvm_check_file_permissions: do not traverse into symlinks
This commit is contained in:
2
nvm.sh
2
nvm.sh
@@ -2784,7 +2784,7 @@ nvm_check_file_permissions() {
|
|||||||
if [ -n "${NVM_DEBUG-}" ]; then
|
if [ -n "${NVM_DEBUG-}" ]; then
|
||||||
nvm_err "${FILE}"
|
nvm_err "${FILE}"
|
||||||
fi
|
fi
|
||||||
if ! nvm_check_file_permissions "${FILE}"; then
|
if [ ! -L "${FILE}" ] && ! nvm_check_file_permissions "${FILE}"; then
|
||||||
return 2
|
return 2
|
||||||
fi
|
fi
|
||||||
elif [ -e "$FILE" ] && [ ! -w "$FILE" ] && [ ! -O "$FILE" ]; then
|
elif [ -e "$FILE" ] && [ ! -w "$FILE" ] && [ ! -O "$FILE" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user