[Tests] clean up .nvmrc after nvm-exec test

This commit is contained in:
Jordan Harband
2026-01-26 22:34:07 -08:00
parent 1d29998546
commit 7827187fc0

View File

@@ -4,7 +4,9 @@ set -x
: nvm.sh : nvm.sh
\. ../../nvm.sh \. ../../nvm.sh
die () { echo "$@" ; rm .nvmrc ; exit 1; } cleanup() { rm -f .nvmrc; }
die () { echo "$@" ; cleanup ; exit 1; }
NVM_TEST_VERSION=v0.42 NVM_TEST_VERSION=v0.42
@@ -19,3 +21,5 @@ No NODE_VERSION provided; no .nvmrc file found";
# Skip install, we want to test the error message # Skip install, we want to test the error message
[ "${EXPECTED}" = "${OUTPUT}" ] || die "expected >${EXPECTED}<, got >${OUTPUT}<" [ "${EXPECTED}" = "${OUTPUT}" ] || die "expected >${EXPECTED}<, got >${OUTPUT}<"
cleanup