From a43ff7c9d958482e81e89c084d268a2c02df9806 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Fri, 23 Oct 2015 00:12:14 -0700 Subject: [PATCH] Ensure that `npm` doesn't print out excess data, regardless of the user's log level. Fixes #881. --- nvm.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nvm.sh b/nvm.sh index 504d629..aaeb357 100755 --- a/nvm.sh +++ b/nvm.sh @@ -1352,10 +1352,10 @@ nvm_die_on_prefix() { fi local NVM_NPM_PREFIX - NVM_NPM_PREFIX="$(npm config get prefix)" + NVM_NPM_PREFIX="$(NPM_CONFIG_LOGLEVEL=warn npm config get prefix)" if ! (nvm_tree_contains_path "$NVM_DIR" "$NVM_NPM_PREFIX" >/dev/null 2>&1); then if [ "_$NVM_DELETE_PREFIX" = "_1" ]; then - npm config delete prefix + NPM_CONFIG_LOGLEVEL=warn npm config delete prefix else nvm deactivate >/dev/null 2>&1 echo >&2 "nvm is not compatible with the npm config \"prefix\" option: currently set to \"$NVM_NPM_PREFIX\""