mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-10-31 01:45:50 +08:00
Don't overwrite existing NVM_DIR vars
This commit is contained in:
4
nvm.sh
4
nvm.sh
@@ -6,7 +6,9 @@
|
||||
# with much bash help from Matthew Ranney
|
||||
|
||||
# Auto detect the NVM_DIR using magic bash 3.x stuff
|
||||
export NVM_DIR=$(dirname ${BASH_ARGV[0]})
|
||||
if [ ! -d "$NVM_DIR" ]; then
|
||||
export NVM_DIR=$(dirname ${BASH_ARGV[0]})
|
||||
fi
|
||||
|
||||
# Emulate curl with wget, if necessary
|
||||
if [ ! `which curl` ]; then
|
||||
|
||||
Reference in New Issue
Block a user