Skip to content

Commit b1ca273

Browse files
Benjamin E. CoeJustinBeckwith
authored andcommitted
build: patch Windows container, fixing Node 10 (#354)
1 parent fdf33e9 commit b1ca273

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.kokoro/test.bat

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,15 @@
1717
cd /d %~dp0
1818
cd ..
1919

20-
call npm install -g npm@latest || goto :error
20+
@rem The image we're currently running has a broken version of Node.js enabled
21+
@rem by nvm (v10.15.3), which has no npm bin. This hack uses the functional
22+
@rem Node v8.9.1 to install npm@latest, it then uses this version of npm to
23+
@rem install npm for v10.15.3.
24+
call nvm use v8.9.1 || goto :error
25+
call node C:\Users\kbuilder\AppData\Roaming\nvm-ps\versions\v8.9.1\node_modules\npm-bootstrap\bin\npm-cli.js i npm -g || goto :error
26+
call nvm use v10.15.3 || goto :error
27+
call node C:\Users\kbuilder\AppData\Roaming\nvm-ps\versions\v8.9.1\node_modules\npm\bin\npm-cli.js i npm -g || goto :error
28+
2129
call npm install || goto :error
2230
call npm run test || goto :error
2331

0 commit comments

Comments
 (0)