diff --git a/nvm.sh b/nvm.sh index 969f818e28..55bcae5a15 100644 --- a/nvm.sh +++ b/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 diff --git "a/test/fast/Listing paths/Running \"nvm which 0.0.2\" should display only version 0.0.2." "b/test/fast/Listing paths/Running \"nvm which 0.0.2\" should display only version 0.0.2." index 7b410c5a7b..333782eb75 100755 --- "a/test/fast/Listing paths/Running \"nvm which 0.0.2\" should display only version 0.0.2." +++ "b/test/fast/Listing paths/Running \"nvm which 0.0.2\" should display only version 0.0.2." @@ -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 diff --git "a/test/fast/Listing versions/Running \"nvm ls\" should filter out \"versions\"" "b/test/fast/Listing versions/Running \"nvm ls\" should filter out \"versions\"" index 0652c6b766..c4d61bd1be 100755 --- "a/test/fast/Listing versions/Running \"nvm ls\" should filter out \"versions\"" +++ "b/test/fast/Listing versions/Running \"nvm ls\" should filter out \"versions\"" @@ -2,7 +2,7 @@ mkdir ../../../v0.1.3 mkdir ../../../v0.2.3 -mkdir ../../../versions +mkdir -p ../../../versions/node . ../../../nvm.sh diff --git "a/test/fast/Listing versions/Running \"nvm ls\" should list versions in the \"versions\" directory" "b/test/fast/Listing versions/Running \"nvm ls\" should list versions in the \"versions\" directory" index eb8f2baac9..8368b1eba7 100755 --- "a/test/fast/Listing versions/Running \"nvm ls\" should list versions in the \"versions\" directory" +++ "b/test/fast/Listing versions/Running \"nvm ls\" should list versions in the \"versions\" directory" @@ -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 diff --git a/test/fast/Unit tests/nvm_version_dir b/test/fast/Unit tests/nvm_version_dir index fb070ce32f..f6346fab10 100755 --- a/test/fast/Unit tests/nvm_version_dir +++ b/test/fast/Unit tests/nvm_version_dir @@ -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' diff --git a/test/fast/Unit tests/nvm_version_path b/test/fast/Unit tests/nvm_version_path index b9fa2e506e..f3ca58440c 100755 --- a/test/fast/Unit tests/nvm_version_path +++ b/test/fast/Unit tests/nvm_version_path @@ -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'