From d81ce5c49abda12e603b4af84dd9e05c3bd4504f Mon Sep 17 00:00:00 2001 From: Scott Kyle Date: Fri, 19 Feb 2016 02:53:10 -0800 Subject: [PATCH] Update test script to always use nvm if possible --- scripts/test.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/scripts/test.sh b/scripts/test.sh index 32b62410..d8b97ee7 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -68,6 +68,12 @@ unlock_device() { cleanup trap cleanup EXIT +# Use a consistent version of Node if possible. +if [ -s "${HOME}/.nvm/nvm.sh" ]; then + . "${HOME}/.nvm/nvm.sh" + nvm use 5.4.0 || true +fi + case "$TARGET" in "jsdoc") npm run jsdoc @@ -108,9 +114,6 @@ case "$TARGET" in exit 0 fi - [ -s "${HOME}/.nvm/nvm.sh" ] && . "${HOME}/.nvm/nvm.sh" - nvm use 5.4.0 || true - pushd react-native/android ./gradlew installarchives popd