[Fix] zsh: when warncreateglobal is set, this line warns for some reason. Use env to suppress it.
Fixes #1236.
This commit is contained in:
4
nvm.sh
4
nvm.sh
@@ -1945,10 +1945,10 @@ nvm_die_on_prefix() {
|
||||
fi
|
||||
|
||||
local NVM_NPM_PREFIX
|
||||
NVM_NPM_PREFIX="$(NPM_CONFIG_LOGLEVEL=warn npm config get prefix)"
|
||||
NVM_NPM_PREFIX="$(npm config --loglevel=warn 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_LOGLEVEL=warn npm config delete prefix
|
||||
npm config --loglevel=warn delete prefix
|
||||
else
|
||||
nvm deactivate >/dev/null 2>&1
|
||||
nvm_err "nvm is not compatible with the npm config \"prefix\" option: currently set to \"$NVM_NPM_PREFIX\""
|
||||
|
||||
Reference in New Issue
Block a user