From eb329ae7a9540355ef5aea0a6de11ae9c8c55783 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Thu, 5 May 2016 23:58:27 -0700 Subject: [PATCH] [minor] display `chmod` command as well to fix file permissions. --- nvm.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nvm.sh b/nvm.sh index 48fa1bf..41bf416 100644 --- a/nvm.sh +++ b/nvm.sh @@ -1963,9 +1963,10 @@ nvm() { VERSION_PATH="$(nvm_version_path "$VERSION")" if ! nvm_check_file_permissions "$VERSION_PATH"; then nvm_err 'Cannot uninstall, incorrect permissions on installation folder.' - nvm_err 'This is usually caused by running `npm install -g` as root. Run the following command as root to fix the permissions and then try again.' + nvm_err 'This is usually caused by running `npm install -g` as root. Run the following commands as root to fix the permissions and then try again.' nvm_err nvm_err " chown -R $(whoami) \"$(nvm_sanitize_path "$VERSION_PATH")\"" + nvm_err " chmod -R u+w \"$(nvm_sanitize_path "$VERSION_PATH")\"" return 1 fi