parent
bb250b5730
commit
8349f0ff48
6
nvm.sh
6
nvm.sh
|
@ -571,11 +571,13 @@ nvm() {
|
||||||
NODE_PATH=$RUN_NODE_PATH $NVM_DIR/$VERSION/bin/node "$@"
|
NODE_PATH=$RUN_NODE_PATH $NVM_DIR/$VERSION/bin/node "$@"
|
||||||
;;
|
;;
|
||||||
"ls" | "list" )
|
"ls" | "list" )
|
||||||
nvm_print_versions "`nvm_ls $2`"
|
NVM_LS_OUTPUT=$(nvm_ls "$2")
|
||||||
|
NVM_LS_EXIT_CODE=$?
|
||||||
|
nvm_print_versions "$NVM_LS_OUTPUT"
|
||||||
if [ $# -eq 1 ]; then
|
if [ $# -eq 1 ]; then
|
||||||
nvm alias
|
nvm alias
|
||||||
fi
|
fi
|
||||||
return
|
return $NVM_LS_EXIT_CODE && $?
|
||||||
;;
|
;;
|
||||||
"ls-remote" | "list-remote" )
|
"ls-remote" | "list-remote" )
|
||||||
nvm_print_versions "`nvm_ls_remote $2`"
|
nvm_print_versions "`nvm_ls_remote $2`"
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
. ../../nvm.sh
|
||||||
|
|
||||||
|
nvm ls nonexistent_version
|
||||||
|
[ "$?" = "3" ]
|
||||||
|
|
Loading…
Reference in New Issue