mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
Throw an error when Chromium download is failed (#619)
This patch teaches ChromiumDownloader to throw an error if downloading failed.
This commit is contained in:
parent
42fa3af659
commit
e95fb96279
@ -98,9 +98,11 @@ module.exports = {
|
|||||||
return downloadFile(url, zipPath, progressCallback)
|
return downloadFile(url, zipPath, progressCallback)
|
||||||
.then(() => extractZip(zipPath, folderPath))
|
.then(() => extractZip(zipPath, folderPath))
|
||||||
.catch(err => err)
|
.catch(err => err)
|
||||||
.then(() => {
|
.then(err => {
|
||||||
if (fs.existsSync(zipPath))
|
if (fs.existsSync(zipPath))
|
||||||
fs.unlinkSync(zipPath);
|
fs.unlinkSync(zipPath);
|
||||||
|
if (err)
|
||||||
|
throw err;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user