Files
vscode/.github
407d9757f0 CI: make the Windows Electron download retry actually retry (#330536)
Make the Windows Electron download retry actually retry

The step wraps the download in a 3-attempt loop, but the retry never
fired. `npm exec` is a native command, and a non-zero exit code from a
native command does not raise a terminating error in PowerShell, so the
`catch` block was unreachable: the first attempt fell through to `break`
and the step then failed on the non-zero exit code.

Wrap the call in `exec { }` from build/azure-pipelines/win32/exec.ps1,
which checks $lastexitcode and throws. This is the same shape the `npm
ci` retry in this file already uses, and it is why that one works.

Seen on a PR run where a transient socket close while fetching Electron
from github.com failed the job on the first attempt, with no retry:

  TypeError: fetch failed
    cause: SocketError: other side closed (UND_ERR_SOCKET)
    at @vscode/gulp-electron/src/download.js

The Linux and macOS workflows are unaffected: their loops use
`if npm exec ...; then`, which tests the exit code directly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 3c35355f-4d36-46e5-8d7a-cb0bc7207449
2026-08-12 22:38:20 +00:00
..
2023-07-06 07:14:31 -07:00
2026-07-23 18:15:53 +00:00