Returning exit code 3 when no version is found.

master
Jordan Harband 2014-06-20 11:45:14 -07:00
parent 1da31aa425
commit f213167ef0
1 changed files with 4 additions and 4 deletions

8
nvm.sh
View File

@ -74,7 +74,7 @@ nvm_version() {
echo "$VERSION" echo "$VERSION"
if [ "$VERSION" = 'N/A' ]; then if [ "$VERSION" = 'N/A' ]; then
return return 3
fi fi
} }
@ -85,7 +85,7 @@ nvm_remote_version() {
echo "$VERSION" echo "$VERSION"
if [ "$VERSION" = 'N/A' ]; then if [ "$VERSION" = 'N/A' ]; then
return return 3
fi fi
} }
@ -139,7 +139,7 @@ nvm_ls() {
fi fi
if [ -z "$VERSIONS" ]; then if [ -z "$VERSIONS" ]; then
echo "N/A" echo "N/A"
return return 3
fi fi
echo "$VERSIONS" echo "$VERSIONS"
return return
@ -160,7 +160,7 @@ nvm_ls_remote() {
| sort -t. -u -k 1.2,1n -k 2,2n -k 3,3n` | sort -t. -u -k 1.2,1n -k 2,2n -k 3,3n`
if [ -z "$VERSIONS" ]; then if [ -z "$VERSIONS" ]; then
echo "N/A" echo "N/A"
return return 3
fi fi
echo "$VERSIONS" echo "$VERSIONS"
return return