Skip to content

Commit

Permalink
[Perf] nvm_check_file_permissions: do not traverse into symlinks
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Aug 26, 2023
1 parent c92adb3 commit 1eaaada
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2784,7 +2784,7 @@ nvm_check_file_permissions() {
if [ -n "${NVM_DEBUG-}" ]; then
nvm_err "${FILE}"
fi
if ! nvm_check_file_permissions "${FILE}"; then
if [ ! -L "${FILE}" ] && ! nvm_check_file_permissions "${FILE}"; then
return 2
fi
elif [ -e "$FILE" ] && [ ! -w "$FILE" ] && [ ! -O "$FILE" ]; then
Expand Down

0 comments on commit 1eaaada

Please sign in to comment.