Ensure that nvm run 0.12 --version errors out sensibly when 0.12 isn't installed.

This commit is contained in:
Jordan Harband
2015-02-01 13:02:46 -08:00
parent e1b7496cf0
commit 0b4c1e14cf
2 changed files with 17 additions and 4 deletions

View File

@@ -0,0 +1,9 @@
#!/bin/sh
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
[ "$(nvm run 0.2 --version 2>&1)" = "v0.2 is not installed yet" ] || die "\`nvm run\` with an uninstalled node version failed to error out correctly"
[ "$(nvm run iojs-0.2 --version 2>&1)" = "iojs-v0.2 is not installed yet" ] || die "\`nvm run\` with an uninstalled iojs version failed to error out correctly"