-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Description
This script task does not run tests on Windows agents:
pipelines-javascript/azure-pipelines.yml
Lines 11 to 13 in 2e35b35
- script: | | |
npm install | |
npm test |
To repro, change the vmImage
to vs2017-win2016
and trigger a build.
I believe this happens because:
npm
isnpm.cmd
on Windows- The
script
task combinesnpm install
andnpm test
into a single.cmd
file and executes it - When an outer batch file calls an inner batch file (without using
call
syntax), when the inner batch file returns, the outer batch file exits early - So, the generated
.cmd
file exits after the firstnpm
command
You can repo this on any Windows machine by executing a batch file containing:
npm install
npm test
To execute both commands, the call
syntax must be used:
call npm install
call npm test
I believe the best fix is to use the Npm
task instead of the script
task (#3).
danielpcampagna
Metadata
Metadata
Assignees
Labels
No labels