diff --git a/nvm.sh b/nvm.sh index 969f818..55bcae5 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 7b410c5..333782e 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 0652c6b..c4d61bd 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 eb8f2ba..8368b1e 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 fb070ce..f6346fa 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 b9fa2e5..f3ca584 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'