This commit is contained in:
Simon Knott 2025-01-21 12:33:36 +01:00
parent c8b2ce08c1
commit 6fb53553e7
No known key found for this signature in database
GPG key ID: 8CEDC00028084AEC

View file

@ -117,7 +117,12 @@ async function main(options: DownloadParams) {
const extraction = pipeline(
decompress,
tar.extract(options.browserDirectory),
);
).catch(e => {
if (e.code === 'ERR_STREAM_PREMATURE_CLOSE') // caused by an upstream error in `downloadFile()`, let's no throw twice
return;
throw e;
});
await Promise.all([
extraction,
downloadFile(options, decompress)