mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-05-10 22:31:51 +00:00
Merge branch 'master' into master
This commit is contained in:
commit
11808cfd37
@ -11,7 +11,6 @@ addons:
|
|||||||
cache:
|
cache:
|
||||||
ccache: true
|
ccache: true
|
||||||
directories:
|
directories:
|
||||||
- $HOME/.npm
|
|
||||||
- $TRAVIS_BUILD_DIR/.cache
|
- $TRAVIS_BUILD_DIR/.cache
|
||||||
- $TRAVIS_BUILD_DIR/node_modules
|
- $TRAVIS_BUILD_DIR/node_modules
|
||||||
before_install:
|
before_install:
|
||||||
|
4
nvm.sh
4
nvm.sh
@ -2338,7 +2338,8 @@ nvm_die_on_prefix() {
|
|||||||
|
|
||||||
# npm first looks at $PREFIX (case-sensitive)
|
# npm first looks at $PREFIX (case-sensitive)
|
||||||
# we do not bother to test the value here; if this env var is set, unset it to continue.
|
# we do not bother to test the value here; if this env var is set, unset it to continue.
|
||||||
if [ -n "${PREFIX-}" ]; then
|
# however, `npm exec` in npm v7.2+ sets $PREFIX; if set, inherit it
|
||||||
|
if [ -n "${PREFIX-}" ] && [ "$(nvm_version_path "$(node -v)")" != "${PREFIX}" ]; then
|
||||||
nvm deactivate >/dev/null 2>&1
|
nvm deactivate >/dev/null 2>&1
|
||||||
nvm_err "nvm is not compatible with the \"PREFIX\" environment variable: currently set to \"${PREFIX}\""
|
nvm_err "nvm is not compatible with the \"PREFIX\" environment variable: currently set to \"${PREFIX}\""
|
||||||
nvm_err 'Run `unset PREFIX` to unset it.'
|
nvm_err 'Run `unset PREFIX` to unset it.'
|
||||||
@ -2554,6 +2555,7 @@ nvm() {
|
|||||||
return $?
|
return $?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
local i
|
||||||
for i in "$@"
|
for i in "$@"
|
||||||
do
|
do
|
||||||
case $i in
|
case $i in
|
||||||
|
Loading…
Reference in New Issue
Block a user