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

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

No files matched your search

+1 -1
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)