From 70e1b81ad3337cb0eb02fc13aa82ab98bcae8f83 Mon Sep 17 00:00:00 2001 From: Koen Punt Date: Mon, 21 Jan 2013 17:26:16 +0100 Subject: [PATCH] Add exit code, fix #190 --- nvm.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nvm.sh b/nvm.sh index 65a0462..e886883 100755 --- a/nvm.sh +++ b/nvm.sh @@ -351,7 +351,7 @@ nvm() VERSION=`nvm_version $2` if [ ! -d $NVM_DIR/$VERSION ]; then echo "$VERSION version is not installed yet" - return; + exit 1 fi if [[ $PATH == *$NVM_DIR/*/bin* ]]; then PATH=${PATH%$NVM_DIR/*/bin*}$NVM_DIR/$VERSION/bin${PATH#*$NVM_DIR/*/bin}