From d04a45b8d18128f32710ca85817a73849a66e8b1 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Mon, 18 Sep 2017 21:08:19 -0700 Subject: [PATCH] Ignore errors when sourcing nvm.sh It fails spuriously if it fails to understand the version of system node. --- scripts/test.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/test.sh b/scripts/test.sh index c7c44ba9..66b66f34 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -233,6 +233,7 @@ trap cleanup EXIT # Use a consistent version of Node if possible. if [[ -z "$(command -v nvm)" ]]; then + set +e if [ -f "$NVM_DIR/nvm.sh" ]; then . "$NVM_DIR/nvm.sh" '' || true elif [ -x "$(command -v brew)" ] && [ -f "$(brew --prefix nvm)/nvm.sh" ]; then @@ -242,6 +243,7 @@ if [[ -z "$(command -v nvm)" ]]; then elif [ -f "$HOME/.nvm/nvm.sh" ]; then . ~/.nvm/nvm.sh '' fi + set -e fi if [[ "$(command -v nvm)" ]]; then nvm install 6.5.0