mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-09-10 08:39:07 +00:00
[Fix] nvm install
: show proper version in .nvmrc
install instructions
This commit is contained in:

committed by
Jordan Harband

parent
7d86701067
commit
9e884b8d7b
@@ -15,7 +15,16 @@ OUTPUT="$(nvm_ensure_version_installed foo 2>&1)"
|
||||
EXIT_CODE=$?
|
||||
EXPECTED_OUTPUT='N/A: version "foo" is not yet installed.
|
||||
|
||||
You need to run "nvm install foo" to install it before using it.'
|
||||
You need to run `nvm install foo` to install and use it.'
|
||||
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "expected 'nvm_ensure_version_installed foo' to give $EXPECTED_OUTPUT, got $OUTPUT"
|
||||
[ "_$EXIT_CODE" = "_1" ] || die "expected 'nvm_ensure_version_installed foo' to exit with 1, got $EXIT_CODE"
|
||||
|
||||
# Case when .nvmrc file is opened, we should be skip showing the version
|
||||
OUTPUT="$(nvm_ensure_version_installed foo 1 2>&1)"
|
||||
EXIT_CODE=$?
|
||||
EXPECTED_OUTPUT='N/A: version "foo" is not yet installed.
|
||||
|
||||
You need to run `nvm install` to install and use the node version specified in `.nvmrc`.'
|
||||
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "expected 'nvm_ensure_version_installed foo' to give $EXPECTED_OUTPUT, got $OUTPUT"
|
||||
[ "_$EXIT_CODE" = "_1" ] || die "expected 'nvm_ensure_version_installed foo' to exit with 1, got $EXIT_CODE"
|
||||
|
||||
@@ -29,7 +38,7 @@ OUTPUT="$(nvm_ensure_version_installed iojs 2>&1)"
|
||||
EXIT_CODE=$?
|
||||
EXPECTED_OUTPUT='N/A: version "iojs" is not yet installed.
|
||||
|
||||
You need to run "nvm install iojs" to install it before using it.'
|
||||
You need to run `nvm install iojs` to install and use it.'
|
||||
[ "_$OUTPUT" = "_$EXPECTED_OUTPUT" ] || die "expected 'nvm_ensure_version_installed iojs' to give $EXPECTED_OUTPUT, got $OUTPUT"
|
||||
[ "_$EXIT_CODE" = "_1" ] || die "expected 'nvm_ensure_version_installed iojs' to exit with 1, got $EXIT_CODE"
|
||||
|
||||
|
Reference in New Issue
Block a user