|
25 | 25 | - windows
|
26 | 26 |
|
27 | 27 | before_install:
|
| 28 | + - if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then npm config set loglevel verbose ; fi |
28 | 29 | # prevents windows error: npm ERR! ... git-sh-setup: file not found
|
29 | 30 | - 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 | 31 | # change default prefix for windows - https://travis-ci.community/t/command-npm-i-g-npm-latest-fails/431/7
|
31 |
| - - if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then echo $NPM_CONFIG_PREFIX; fi |
32 |
| - - if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then export NPM_CONFIG_PREFIX_ORIG=$NPM_CONFIG_PREFIX; fi |
33 |
| - - if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then export NPM_CONFIG_PREFIX=c:\\npm_prefix PATH=/c/npm_prefix:$PATH; fi |
| 32 | + #- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then export NPM_CONFIG_PREFIX=c:\\npm_prefix PATH=/c/npm_prefix:$PATH; fi |
34 | 33 | # workspaces require npm 7 or above
|
35 |
| - - npm install -g npm@latest |
| 34 | + - if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then ren `npm prefix -g`/node_modules/npm `npm prefix -g`/node_modules/npm_old && node `npm prefix -g`/node_modules/npm_old/bin/npm-cli.js i -g npm@latest ; fi |
| 35 | + - if [[ "$TRAVIS_OS_NAME" != "windows" ]]; then npm install -g npm@latest ; fi |
36 | 36 | # restore default prefix for windows - https://travis-ci.community/t/command-npm-i-g-npm-latest-fails/431/7
|
37 |
| - - if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then export NPM_CONFIG_PREFIX=$NPM_CONFIG_PREFIX_ORIG; fi |
| 37 | + #- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then export NPM_CONFIG_PREFIX=""; fi |
38 | 38 | # the default path is broken up with node 14 and npm 7 on Windows - https://github.com/npm/cli/issues/2665
|
39 |
| - - if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then export PATH=`npm prefix -g`:$PATH ; fi |
| 39 | + #- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then export PATH=`npm prefix -g`:$PATH ; fi |
40 | 40 | # allow windows to run scripts with node 14 and npm 7 (may not be necessary when node 14 is no longer lts)
|
41 | 41 | - if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then npm config set script-shell c:/PROGRA~1/Git/bin/bash.exe ; fi
|
42 |
| - - if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then npm config set loglevel verbose ; fi |
43 | 42 |
|
44 | 43 | script: npx nyc -s npm run test -- -- -- -t node --bail
|
45 | 44 | after_success: npx nyc report --reporter=text-lcov > coverage.lcov && npx codecov
|
|
0 commit comments