Use `NVM_VERSION` instead of `VERSION` to be a bit less intrusive.
Fixes #820.
parent
0d898b0aa4
commit
0ef20199dc
10
nvm.sh
10
nvm.sh
|
@ -1992,15 +1992,15 @@ nvm_supports_source_options() {
|
||||||
[ "_$(echo 'echo $1' | . /dev/stdin yes 2> /dev/null)" = "_yes" ]
|
[ "_$(echo 'echo $1' | . /dev/stdin yes 2> /dev/null)" = "_yes" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
VERSION="$(nvm_alias default 2>/dev/null || echo)"
|
NVM_VERSION="$(nvm_alias default 2>/dev/null || echo)"
|
||||||
if nvm_supports_source_options && [ "_$1" = "_--install" ]; then
|
if nvm_supports_source_options && [ "_$1" = "_--install" ]; then
|
||||||
if [ -n "$VERSION" ]; then
|
if [ -n "$NVM_VERSION" ]; then
|
||||||
nvm install "$VERSION" >/dev/null
|
nvm install "$NVM_VERSION" >/dev/null
|
||||||
elif nvm_rc_version >/dev/null 2>&1; then
|
elif nvm_rc_version >/dev/null 2>&1; then
|
||||||
nvm install >/dev/null
|
nvm install >/dev/null
|
||||||
fi
|
fi
|
||||||
elif [ -n "$VERSION" ]; then
|
elif [ -n "$NVM_VERSION" ]; then
|
||||||
nvm use --silent "$VERSION" >/dev/null
|
nvm use --silent "$NVM_VERSION" >/dev/null
|
||||||
elif nvm_rc_version >/dev/null 2>&1; then
|
elif nvm_rc_version >/dev/null 2>&1; then
|
||||||
nvm use --silent >/dev/null
|
nvm use --silent >/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue