From 93ec51ec76efb751162114f91e693019597b3471 Mon Sep 17 00:00:00 2001 From: Garrett Luu Date: Wed, 1 Jul 2020 17:56:41 -0700 Subject: [PATCH] Fixed failing travis builds (#2040) * Added condition npm install to travis * Updated node_version.sh perms --- .travis.yml | 2 +- misc/node_version.sh | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100755 misc/node_version.sh diff --git a/.travis.yml b/.travis.yml index 7364fae..6dd4d6a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -44,7 +44,7 @@ matrix: before_install: - "npm config set strict-ssl false" - # - "npm install -g npm@4.3.0" + - "./misc/node_version.sh" - "npm install -g mocha@2.x voc" - "npm install blanket" - "npm install word" diff --git a/misc/node_version.sh b/misc/node_version.sh new file mode 100755 index 0000000..da9b9e0 --- /dev/null +++ b/misc/node_version.sh @@ -0,0 +1,11 @@ +#! /usr/bin/env bash + +# This script will check the current version of node and install another version +# of npm if node is version 0.8 + +version=$(node --version) + +if [[ $version =~ v0\.8\. ]] +then + npm install -g npm@4.3.0 +fi \ No newline at end of file