[feature] Allow passing additional arguments to node

For example:

    nvm run v0.6.0 myApp.js
master
Maciej Małecki 2011-11-05 17:32:17 +01:00
parent 335a253323
commit 53e1764a8a
1 changed files with 2 additions and 2 deletions

4
nvm.sh
View File

@ -202,7 +202,7 @@ nvm()
;;
"run" )
# run given version of node
if [ $# -ne 2 ]; then
if [ $# -lt 2 ]; then
nvm help
return
fi
@ -212,7 +212,7 @@ nvm()
return;
fi
echo "Running node $VERSION"
$NVM_DIR/$VERSION/bin/node
$NVM_DIR/$VERSION/bin/node "${@:3}"
;;
"ls" | "list" )
if [ $# -ne 1 ]; then