mirror of
https://github.com/nvm-sh/nvm.git
synced 2025-08-20 04:23:43 +00:00
updated error message test
This commit is contained in:
parent
68fe9f1b80
commit
70afc73fa5
@ -12,7 +12,7 @@ nvm deactivate >/dev/null 2>&1 || die 'deactivate failed'
|
|||||||
# Attempt to use 'lts' without '--' and capture the error message
|
# Attempt to use 'lts' without '--' and capture the error message
|
||||||
ERROR_OUTPUT=$(nvm use lts 2>&1) || true
|
ERROR_OUTPUT=$(nvm use lts 2>&1) || true
|
||||||
|
|
||||||
EXPECTED_ERROR="You need to run \`nvm install --lts\` to install and \`nvm use --lts\` to use it."
|
EXPECTED_ERROR="`lts` is not an alias - you may need to run \`nvm install --lts\` to install and \`nvm use --lts\` to use it."
|
||||||
|
|
||||||
# Check if the error message matches the expected output
|
# Check if the error message matches the expected output
|
||||||
echo "$ERROR_OUTPUT" | grep -q "$EXPECTED_ERROR" \
|
echo "$ERROR_OUTPUT" | grep -q "$EXPECTED_ERROR" \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user