mirror of
https://github.com/nvm-sh/nvm.git
synced 2026-02-04 17:02:48 +08:00
[Tests] clean up .nvmrc after nvm-exec test
This commit is contained in:
@@ -4,7 +4,9 @@ set -x
|
||||
: nvm.sh
|
||||
\. ../../nvm.sh
|
||||
|
||||
die () { echo "$@" ; rm .nvmrc ; exit 1; }
|
||||
cleanup() { rm -f .nvmrc; }
|
||||
|
||||
die () { echo "$@" ; cleanup ; exit 1; }
|
||||
|
||||
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
|
||||
[ "${EXPECTED}" = "${OUTPUT}" ] || die "expected >${EXPECTED}<, got >${OUTPUT}<"
|
||||
|
||||
cleanup
|
||||
|
||||
Reference in New Issue
Block a user