Skip to content

Commit

Permalink
return not exit
Browse files Browse the repository at this point in the history
  • Loading branch information
creationix committed Jan 21, 2013
1 parent 87a76af commit f605581
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ nvm()
VERSION=`nvm_version $2`
if [ ! -d $NVM_DIR/$VERSION ]; then
echo "$VERSION version is not installed yet"
exit 1
return 1
fi
if [[ $PATH == *$NVM_DIR/*/bin* ]]; then
PATH=${PATH%$NVM_DIR/*/bin*}$NVM_DIR/$VERSION/bin${PATH#*$NVM_DIR/*/bin}
Expand Down

3 comments on commit f605581

@bear
Copy link

@bear bear commented on f605581 Jan 21, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was just working up a pull request for this - it caused me some minor grief as suddenly all my terminal windows started closing and it's hard to edit .bash_profile from something other than a termina.

@koenpunt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah yeah, my bad. It is a shell function of course, not a script. Sorry for the inconvenience..

@bear
Copy link

@bear bear commented on f605581 Jan 21, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no worries - it was fun exploring the code to find the failure

Please sign in to comment.