Update test script to always use nvm if possible

This commit is contained in:
Scott Kyle 2016-02-19 02:53:10 -08:00
parent 600a8909d3
commit d81ce5c49a
1 changed files with 6 additions and 3 deletions

View File

@ -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