Make sure `nvm run` works with iojs prefixes.
parent
d9340b6a53
commit
41c379839d
15
nvm.sh
15
nvm.sh
|
@ -1076,11 +1076,22 @@ nvm() {
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Running node $VERSION"
|
local NVM_IOJS
|
||||||
|
if nvm_is_iojs_version "$VERSION"; then
|
||||||
|
NVM_IOJS=true
|
||||||
|
fi
|
||||||
|
|
||||||
local ARGS
|
local ARGS
|
||||||
ARGS="$@"
|
ARGS="$@"
|
||||||
local OUTPUT
|
local OUTPUT
|
||||||
OUTPUT="$(nvm use "$VERSION" >/dev/null && node "$ARGS")"
|
|
||||||
|
if [ "$NVM_IOJS" = true ]; then
|
||||||
|
echo "Running io.js $(nvm_strip_iojs_prefix "$VERSION")"
|
||||||
|
OUTPUT="$(nvm use "$VERSION" >/dev/null && iojs "$ARGS")"
|
||||||
|
else
|
||||||
|
echo "Running node $VERSION"
|
||||||
|
OUTPUT="$(nvm use "$VERSION" >/dev/null && node "$ARGS")"
|
||||||
|
fi
|
||||||
local EXIT_CODE
|
local EXIT_CODE
|
||||||
EXIT_CODE="$?"
|
EXIT_CODE="$?"
|
||||||
echo "$OUTPUT"
|
echo "$OUTPUT"
|
||||||
|
|
Loading…
Reference in New Issue