mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
fix(browserfetcher): handle extract-zip errors (#3052)
This commit is contained in:
parent
40466cb3a4
commit
8c713ef1bd
@ -233,7 +233,12 @@ function downloadFile(url, destinationPath, progressCallback) {
|
||||
* @return {!Promise<?Error>}
|
||||
*/
|
||||
function extractZip(zipPath, folderPath) {
|
||||
return new Promise(fulfill => extract(zipPath, {dir: folderPath}, fulfill));
|
||||
return new Promise((fulfill, reject) => extract(zipPath, {dir: folderPath}, err => {
|
||||
if (err)
|
||||
reject(err);
|
||||
else
|
||||
fulfill();
|
||||
}));
|
||||
}
|
||||
|
||||
function httpRequest(url, method, response) {
|
||||
|
Loading…
Reference in New Issue
Block a user