Make sure nvm run works without a version argument when .nvmrc specifies a version.

This commit is contained in:
Jordan Harband
2014-04-19 15:09:40 -07:00
parent 4cf940153c
commit 20953ab04c
5 changed files with 68 additions and 10 deletions

View File

@@ -0,0 +1,12 @@
#!/bin/sh
die () { echo $@ ; exit 1; }
. ../../../nvm.sh
echo "0.10.7" > .nvmrc
[ "$(nvm run --version | tail -1)" = "v0.10.7" ] || die "`nvm run` failed to run with the .nvmrc version"
[ "$(nvm run --version | head -1)" = "Found .nvmrc files with version <0.10.7>" ] || die "`nvm run` failed to print out the \"found in .nvmrc\" message"