From 9d17bca868f4b5777d4db03769d576e7cd95cc7a Mon Sep 17 00:00:00 2001 From: Christopher Hiller Date: Fri, 2 Dec 2016 15:02:41 -0800 Subject: [PATCH] sanity test uses npm v1.4.x under Node.js v0.10 (experimental) --- scripts/travis-before-install.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/scripts/travis-before-install.sh b/scripts/travis-before-install.sh index 9913070ae9..38a2043ba6 100755 --- a/scripts/travis-before-install.sh +++ b/scripts/travis-before-install.sh @@ -1,5 +1,13 @@ #!/usr/bin/env bash -npm install --production -# this avoids our mocha.opts (and thus devDependencies) in a roundabout way +# install npm@1.4 locally, and try to install production dependencies w/ it. +if [[ ${TRAVIS_NODE_VERSION} =~ 'v0.10' ]] +then + npm install npm@~1.4 + ./node_modules/.bin/npm install --production +else + npm install --production +fi + +# avoids our mocha.opts (and thus devDependencies) in a roundabout way ./bin/mocha --opts /dev/null --reporter spec test/sanity/sanity.spec.js