Make nvm ls support listing the "versions" directory when it's present.

This commit is contained in:
Jordan Harband
2014-08-20 00:42:50 -07:00
parent 65c2435418
commit 5dd2d7e5d4
3 changed files with 20 additions and 2 deletions

View File

@@ -0,0 +1,12 @@
#!/bin/sh
die () { echo $@ ; exit 1; }
mkdir -p ../../../versions/v0.12.1
mkdir ../../../v0.1.3
. ../../../nvm.sh
nvm ls 0.12 | grep v0.12.1 || die '"nvm ls" did not list a version in the versions/ directory'
nvm ls 0.1 | grep v0.1.3 || die '"nvm ls" did not list a version not in the versions/ directory'