From 096ba0d8c3036095b9a9cdba3dd87b61cb03132e Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Thu, 5 Mar 2020 17:40:17 -0800 Subject: [PATCH] `uninstall`: add `NVM_DEBUG` to print out a filename as its permissions are checked --- nvm.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nvm.sh b/nvm.sh index 96c662f..202d779 100644 --- a/nvm.sh +++ b/nvm.sh @@ -2327,7 +2327,10 @@ nvm_check_file_permissions() { nvm_is_zsh && setopt local_options nonomatch for FILE in "$1"/* "$1"/.[!.]* "$1"/..?* ; do if [ -d "$FILE" ]; then - if ! nvm_check_file_permissions "$FILE"; then + if [ -n "${NVM_DEBUG-}" ]; then + nvm_err "${FILE}" + fi + if ! nvm_check_file_permissions "${FILE}"; then return 2 fi elif [ -e "$FILE" ] && [ ! -w "$FILE" ] && [ ! -O "$FILE" ]; then