nvm run: use common code path for "ensure version installed"
Better than cb033adc6f
parent
a0e94e16de
commit
937c29c95a
15
nvm.sh
15
nvm.sh
|
@ -1876,16 +1876,6 @@ nvm() {
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$NVM_RC_VERSION" ]; then
|
|
||||||
nvm_ensure_version_installed "$NVM_RC_VERSION"
|
|
||||||
else
|
|
||||||
nvm_ensure_version_installed "$provided_version"
|
|
||||||
fi
|
|
||||||
EXIT_CODE=$?
|
|
||||||
if [ "$EXIT_CODE" != "0" ]; then
|
|
||||||
return $EXIT_CODE
|
|
||||||
fi
|
|
||||||
|
|
||||||
local NVM_IOJS
|
local NVM_IOJS
|
||||||
if nvm_is_iojs_version "$VERSION"; then
|
if nvm_is_iojs_version "$VERSION"; then
|
||||||
NVM_IOJS=true
|
NVM_IOJS=true
|
||||||
|
@ -1902,7 +1892,10 @@ nvm() {
|
||||||
ZHS_HAS_SHWORDSPLIT_UNSET=$(setopt | command grep shwordsplit > /dev/null ; echo $?)
|
ZHS_HAS_SHWORDSPLIT_UNSET=$(setopt | command grep shwordsplit > /dev/null ; echo $?)
|
||||||
setopt shwordsplit
|
setopt shwordsplit
|
||||||
fi
|
fi
|
||||||
if [ -z "$ARGS" ]; then
|
if [ "_$VERSION" = "_N/A" ]; then
|
||||||
|
nvm_ensure_version_installed "$provided_version"
|
||||||
|
EXIT_CODE=$?
|
||||||
|
elif [ -z "$ARGS" ]; then
|
||||||
if [ "$NVM_IOJS" = true ]; then
|
if [ "$NVM_IOJS" = true ]; then
|
||||||
nvm exec "$VERSION" iojs
|
nvm exec "$VERSION" iojs
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue