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