Put node versions >= 0.12 in `versions/node` instead of just `versions`
parent
d5e21be164
commit
0ad5a450fe
2
nvm.sh
2
nvm.sh
|
@ -143,7 +143,7 @@ nvm_version_dir() {
|
|||
local NVM_WHICH_DIR
|
||||
NVM_WHICH_DIR="$1"
|
||||
if [ -z "$NVM_WHICH_DIR" ] || [ "_$NVM_WHICH_DIR" = "_new" ]; then
|
||||
echo "$NVM_DIR/versions"
|
||||
echo "$NVM_DIR/versions/node"
|
||||
elif [ "_$NVM_WHICH_DIR" = "_old" ]; then
|
||||
echo "$NVM_DIR"
|
||||
else
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
mkdir -p ../../../v0.0.2
|
||||
mkdir -p ../../../v0.0.20
|
||||
mkdir -p ../../../versions/v0.12.0
|
||||
mkdir -p ../../../versions/node/v0.12.0
|
||||
|
||||
. ../../../nvm.sh
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
mkdir ../../../v0.1.3
|
||||
mkdir ../../../v0.2.3
|
||||
mkdir ../../../versions
|
||||
mkdir -p ../../../versions/node
|
||||
|
||||
. ../../../nvm.sh
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
die () { echo $@ ; exit 1; }
|
||||
|
||||
mkdir -p ../../../versions/v0.12.1
|
||||
mkdir -p ../../../versions/node/v0.12.1
|
||||
mkdir ../../../v0.1.3
|
||||
|
||||
. ../../../nvm.sh
|
||||
|
|
|
@ -4,7 +4,7 @@ die () { echo $@ ; exit 1; }
|
|||
|
||||
. ../../../nvm.sh
|
||||
|
||||
[ "$(nvm_version_dir)" = "$NVM_DIR/versions" ] || die '"nvm_version_dir" did not return new dir path'
|
||||
[ "$(nvm_version_dir)" = "$NVM_DIR/versions/node" ] || die '"nvm_version_dir" did not return new dir path'
|
||||
[ "$(nvm_version_dir new)" = "$(nvm_version_dir)" ] || die '"nvm_version_dir new" did not return new dir path'
|
||||
[ "$(nvm_version_dir old)" = "$NVM_DIR" ] || die '"nvm_version_dir old" did not return old dir path'
|
||||
[ "$(nvm_version_dir foo 2>&1)" = "unknown version dir" ] || die '"nvm_version_dir foo" did not error out'
|
||||
|
|
|
@ -7,5 +7,5 @@ die () { echo $@ ; exit 1; }
|
|||
[ "$(nvm_version_path foo)" = "$NVM_DIR/foo" ] || die '"nvm_version_path foo" did not return correct location'
|
||||
[ "$(nvm_version_path 2>&1)" = "version is required" ] || die '"nvm_version_path" did not error out'
|
||||
[ "$(nvm_version_path v0.11.0)" = "$NVM_DIR/v0.11.0" ] || die 'old version has the wrong path'
|
||||
[ "$(nvm_version_path v0.12.0)" = "$NVM_DIR/versions/v0.12.0" ] || die 'new version has the wrong path'
|
||||
[ "$(nvm_version_path v0.12.0)" = "$NVM_DIR/versions/node/v0.12.0" ] || die 'new version has the wrong path'
|
||||
|
||||
|
|
Loading…
Reference in New Issue