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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user