[Tests] use $NVM_DIR instead of relative paths

This commit is contained in:
Jordan Harband
2016-06-26 15:52:26 -07:00
parent ce60b6c44a
commit 73aa35f508
27 changed files with 137 additions and 151 deletions

View File

@@ -2,13 +2,13 @@
die () { echo $@ ; cleanup ; exit 1; }
cleanup () {
rm -rf ../../v0.10.4
rm -rf "${NVM_DIR}/v0.10.4"
}
mkdir ../../v0.10.4
. ../../nvm.sh
mkdir "${NVM_DIR}/v0.10.4"
nvm deactivate >/dev/null 2>&1
INSTALL_ERROR_MSG="$(nvm install v0.10.5 --reinstall-packages-from=0.11 2>&1)"
@@ -29,3 +29,4 @@ INSTALL_EXIT_CODE="$(nvm install v0.10.5 --reinstall-packages-from=0.10.5 >/dev/
[ "~$INSTALL_EXIT_CODE" = "~4" ] \
|| die ""nvm install --reinstall-packages-from" should exit with code 4 when given the same version, got $INSTALL_EXIT_CODE"
cleanup