[New] support --no-use on sourcing, in supported shells.

Fixes #972.
This commit is contained in:
Jordan Harband
2016-01-20 12:50:45 -08:00
parent e76fe61d95
commit 4fcf37fa29
3 changed files with 68 additions and 12 deletions

View File

@@ -2,7 +2,7 @@
DIR="$(command cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source "$DIR/nvm.sh"
. "$DIR/nvm.sh" --no-use
if [ -n "$NODE_VERSION" ]; then
nvm use $NODE_VERSION > /dev/null || (echo "NODE_VERSION not set" >&2 && exit 127)