From 59939d09e8f7b089d47a8976e5d0a02a3cc8a173 Mon Sep 17 00:00:00 2001 From: stelcheck Date: Thu, 28 Aug 2014 22:45:07 +0900 Subject: [PATCH] * Make the creation of a symlink an overridable default behaviour --- nvm.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nvm.sh b/nvm.sh index e121fff..01585e3 100644 --- a/nvm.sh +++ b/nvm.sh @@ -647,7 +647,9 @@ nvm() { export NODE_PATH export NVM_PATH="$NVM_VERSION_DIR/lib/node" export NVM_BIN="$NVM_VERSION_DIR/bin" - rm -f "$NVM_DIR/current" && ln -s "$NVM_VERSION_DIR" "$NVM_DIR/current" + if [ "$NVM_SYMLINK_CURRENT" = true ] || [ -z "$NVM_SYMLINK_CURRENT" ]; then + rm -f "$NVM_DIR/current" && ln -s "$NVM_VERSION_DIR" "$NVM_DIR/current" + fi echo "Now using node $VERSION" ;; "run" )