diff --git a/nvm.sh b/nvm.sh index 4dd189a..9a0669b 100755 --- a/nvm.sh +++ b/nvm.sh @@ -78,7 +78,8 @@ if [ -z "$NVM_DIR" ]; then if [ -n "$BASH_SOURCE" ]; then NVM_SCRIPT_SOURCE="${BASH_SOURCE[0]}" fi - export NVM_DIR="$(cd $NVM_CD_FLAGS $(dirname "${NVM_SCRIPT_SOURCE:-$0}") > /dev/null && \pwd)" + NVM_DIR="$(cd $NVM_CD_FLAGS $(dirname "${NVM_SCRIPT_SOURCE:-$0}") > /dev/null && \pwd)" + export NVM_DIR fi unset NVM_SCRIPT_SOURCE 2> /dev/null