fix(cli): wrap streaming-phase download timeout with friendly message

downloadVerifiedBinary only wrapped isTimeoutError around the fetch()
catch, so a 15-minute timeout firing while pipeline() streamed the
response body re-threw the raw "TimeoutError: The operation timed out."
Mirror the wrap into the pipeline catch after cleaning up the partial
file, matching the connection-phase message.

Fixes #6822
This commit is contained in:
roboomp
2026-07-27 18:19:38 +00:00
parent 2f63a07ba9
commit 7f4f322c73
3 changed files with 32 additions and 0 deletions
@@ -231,6 +231,9 @@ export async function downloadVerifiedBinary(options: VerifiedBinaryDownloadOpti
await fs.promises.chmod(options.targetPath, 0o755);
} catch (err) {
await unlinkIfExists(options.targetPath);
if (isTimeoutError(err)) {
throw new Error("Timed out downloading release binary after 15 minutes", { cause: err });
}
throw err;
}
}