mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-09-10 08:39:07 +00:00
[Fix] zsh
: when warncreateglobal
is set, this line warns for some reason. Use env
to suppress it.
Fixes #1236.
This commit is contained in:
@@ -36,7 +36,7 @@ nvm_has() { return 0; }
|
||||
npm() {
|
||||
local args
|
||||
args="$@"
|
||||
if [ "_$args" = "_config get prefix" ]; then
|
||||
if [ "_$args" = "_config --loglevel=warn get prefix" ]; then
|
||||
echo "$(nvm_version_dir new)/good prefix"
|
||||
fi
|
||||
}
|
||||
@@ -60,7 +60,7 @@ EXIT_CODE="$(NPM_CONFIG_PREFIX=bar nvm_die_on_prefix 0 foo >/dev/null 2>&1; echo
|
||||
npm() {
|
||||
local args
|
||||
args="$@"
|
||||
if [ "_$args" = "_config get prefix" ]; then
|
||||
if [ "_$args" = "_config --loglevel=warn get prefix" ]; then
|
||||
echo "./bad prefix"
|
||||
fi
|
||||
}
|
||||
|
Reference in New Issue
Block a user