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