File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 27
27
before_install :
28
28
# prevents windows error: npm ERR! ... git-sh-setup: file not found
29
29
- 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
+ # 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
30
34
# 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
35
- npm install -g npm@latest
33
- # allow windows to run scripts with node 14 and npm 7 (may not be necessary when node 14 is no longer lts)
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
38
+ # the default path is broken up with node 14 and npm 7 on Windows - https://github.com/npm/cli/issues/2665
34
39
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then export PATH=`npm prefix -g`:$PATH ; fi
40
+ # allow windows to run scripts with node 14 and npm 7 (may not be necessary when node 14 is no longer lts)
35
41
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then npm config set script-shell c:/PROGRA~1/Git/bin/bash.exe ; fi
36
42
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then npm config set loglevel verbose ; fi
37
43
You can’t perform that action at this time.
0 commit comments