Skip to content

Commit 9c0fc7c

Browse files
committed
chore: move npm install
1 parent 2120293 commit 9c0fc7c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ before_install:
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
3434
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then export NODE_INSTALL_DIR=`npm prefix -g` ; fi
35-
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then mv $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
35+
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then mv $NODE_INSTALL_DIR/node_modules $NODE_INSTALL_DIR/node_modules_old ; fi
36+
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then mkdir $NODE_INSTALL_DIR/node_modules ; fi
37+
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then node $NODE_INSTALL_DIR/node_modules_old/npm/bin/npm-cli.js i -g npm@latest ; fi
3638
- if [[ "$TRAVIS_OS_NAME" != "windows" ]]; then npm install -g npm@latest ; fi
3739
# restore default prefix for windows - https://travis-ci.community/t/command-npm-i-g-npm-latest-fails/431/7
3840
#- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then export NPM_CONFIG_PREFIX=""; fi

0 commit comments

Comments
 (0)