[Fix] nvm install: show proper version in .nvmrc install instructions

This commit is contained in:
deepakchethan
2022-03-22 18:58:18 +05:30
committed by Jordan Harband
parent 7d86701067
commit 9e884b8d7b
5 changed files with 71 additions and 10 deletions

View File

@@ -7,10 +7,10 @@ die () { echo "$@" ; exit 1; }
EXPECTED_OUTPUT='N/A: version "v0.2" is not yet installed.
You need to run "nvm install 0.2" to install it before using it.'
You need to run `nvm install 0.2` to install and use it.'
[ "_$(nvm run 0.2 --version 2>&1)" = "_$EXPECTED_OUTPUT" ] || die "\`nvm run\` with an uninstalled node version failed to error out correctly"
EXPECTED_OUTPUT='N/A: version "iojs-v0.2" is not yet installed.
You need to run "nvm install iojs-0.2" to install it before using it.'
You need to run `nvm install iojs-0.2` to install and use it.'
[ "_$(nvm run iojs-0.2 --version 2>&1)" = "_$EXPECTED_OUTPUT" ] || die "\`nvm run\` with an uninstalled iojs version failed to error out correctly"