Skip to content

Commit

Permalink
Test: Update npm to v4 when nodejs is v5 because of npm install error.
Browse files Browse the repository at this point in the history
  • Loading branch information
sttk committed Sep 21, 2020
1 parent e970322 commit e89907f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ node_js:
- '0.12'
- '0.10'

before_install:
- if [ $(echo "${TRAVIS_NODE_VERSION}" | cut -d'.' -f1) -eq 5 ]; then
npm i -g npm@4;
fi

after_success:
- if [ $(echo "${TRAVIS_NODE_VERSION}" | cut -d'.' -f1) -ge 6 ]; then
npm run coveralls;
Expand Down
3 changes: 2 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ environment:

install:
- ps: Install-Product node $env:nodejs_version
- npm install
- ps: if ($env:nodejs_version -eq '5') { npm i -g npm@4 }
- cmd: npm install

test_script:
- node --version
Expand Down

0 comments on commit e89907f

Please # to comment.