Skip to content

Commit beff798

Browse files
committed
chore: set config after install
1 parent 15fd296 commit beff798

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ os:
2727
before_install:
2828
# prevents windows error: npm ERR! ... git-sh-setup: file not found
2929
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then export PATH=/c/PROGRA~1/Git/usr/bin:/c/PROGRA~1/Git/mingw64/libexec/git-core:$PATH ; fi
30+
# workspaces require npm 7 or above
31+
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then export NPM_CONFIG_PREFIX=c:\\npm_prefix PATH="/c/npm_prefix:$PATH"; fi
32+
- npm install -g npm@latest
3033
# allow windows to run scripts with node 14 and npm 7 (may not be necessary when node 14 is no longer lts)
3134
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then export PATH=`npm prefix -g`:$PATH ; fi
3235
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then npm config set script-shell c:/PROGRA~1/Git/bin/bash.exe ; fi
3336
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then npm config set loglevel verbose ; fi
34-
# workspaces require npm 7 or above
35-
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then export NPM_CONFIG_PREFIX=c:\\npm_prefix PATH="/c/npm_prefix:$PATH"; fi
36-
- npm install -g npm@latest
3737

3838
script: npx nyc -s npm run test -- -- -- -t node --bail
3939
after_success: npx nyc report --reporter=text-lcov > coverage.lcov && npx codecov

0 commit comments

Comments
 (0)