Fix node 6 and 8 testing on Travis

Later versions of node-gyp (7.0.0) being installed by npm don't seem
to work with node 6 and 8.
This commit is contained in:
William S Fulton 2020-06-06 10:29:41 +01:00
commit ba0154d90a

View file

@ -39,9 +39,11 @@ case "$SWIGLANG" in
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
travis_retry nvm install ${VER}
nvm use ${VER}
if [ "$VER" == "0.10" ] || [ "$VER" == "0.12" ] || [ "$VER" == "4" ] ; then
if [ "$VER" == "0.10" ] || [ "$VER" == "0.12" ] || [ "$VER" == "4" ] || [ "$VER" == "6" ] ; then
# travis_retry sudo apt-get install -qq nodejs node-gyp
travis_retry npm install -g node-gyp@$VER
elif [ "$VER" == "8" ] ; then
travis_retry npm install -g node-gyp@6
else
travis_retry npm install -g node-gyp
fi