The GitHub Actions PR test workflows run integration/smoke tests out of
sources, so each test section launches scripts/code.bat, which runs
build/lib/preLaunch.ts. Unlike the Azure Pipelines product builds, the
GitHub workflows did not set VSCODE_SKIP_PRELAUNCH, so preLaunch ran on
every section and getElectron() unconditionally deleted and re-downloaded
.build/electron each time. On Windows this races with file locks held by
the just-exited Electron process and intermittently fails the whole job
with the bare 'The system cannot find the path specified.' error.
- Set VSCODE_SKIP_PRELAUNCH=1 on the unit/integration/remote test steps of
the win32, linux and darwin PR workflows, matching Azure Pipelines (the
workflows already prepare node_modules, out, built-in extensions and
Electron in dedicated steps before the tests run).
- Make getElectron() version-aware: skip the destructive re-download when
the installed Electron already matches the expected version, falling back
to a download on any detection failure.
- Make scripts/code.bat fail fast with a clear message when preLaunch.ts
fails instead of falling through to launch a missing executable.
- Retry rimraf on EBUSY/EPERM (Windows file-lock codes), not just ENOTEMPTY.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Run our build scripts directly as typescript #277567
Follow up on #276864
For #277526
* Remove a few more ts-node references
* Fix linux and script reference
* Remove `_build-script` ref
* Fix script missing closing quote
* use type only import
* Fix export
* Make sure to run copy-policy-dto
* Make sure we run the copy-policy-dto script
* Enable `verbatimModuleSyntax`
* Pipelines fixes
* Try adding explicit ext to path
* Fix bad edit
* Revert extra `--`
---------
Co-authored-by: João Moreno <joaomoreno@users.noreply.github.com>