diff --git a/utils/ChromiumDownloader.js b/utils/ChromiumDownloader.js index 611ecb56..6992d991 100644 --- a/utils/ChromiumDownloader.js +++ b/utils/ChromiumDownloader.js @@ -98,9 +98,11 @@ module.exports = { return downloadFile(url, zipPath, progressCallback) .then(() => extractZip(zipPath, folderPath)) .catch(err => err) - .then(() => { + .then(err => { if (fs.existsSync(zipPath)) fs.unlinkSync(zipPath); + if (err) + throw err; }); }, @@ -234,4 +236,4 @@ function requestOptions(url, method = 'GET') { } return result; -} \ No newline at end of file +}