Skip to content

Commit f29cd5a

Browse files
committed
chore: env vars
1 parent ba1fd57 commit f29cd5a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ before_install:
3131
# change default prefix for windows - https://travis-ci.community/t/command-npm-i-g-npm-latest-fails/431/7
3232
#- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then export NPM_CONFIG_PREFIX=c:\\npm_prefix PATH=/c/npm_prefix:$PATH; fi
3333
# workspaces require npm 7 or above
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
34+
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then export NODE_INSTALL_DIR=`npm prefix -g` ; fi
35+
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then ren $NODE_INSTALL_DIR/node_modules/npm $NODE_INSTALL_DIR/node_modules/npm_old && node $NODE_INSTALL_DIR/node_modules/npm_old/bin/npm-cli.js i -g npm@latest ; fi
3536
- if [[ "$TRAVIS_OS_NAME" != "windows" ]]; then npm install -g npm@latest ; fi
3637
# restore default prefix for windows - https://travis-ci.community/t/command-npm-i-g-npm-latest-fails/431/7
3738
#- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then export NPM_CONFIG_PREFIX=""; fi

0 commit comments

Comments
 (0)