From f123c8c3406d78daca9d30f2c0b243e400e6c228 Mon Sep 17 00:00:00 2001 From: LawnCable Date: Mon, 1 Mar 2021 01:43:00 +0100 Subject: update dependencies to make it run again update typescript, electron and extract-zip --- src/main/manaplus/manaApp/windows.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/main/manaplus/manaApp') diff --git a/src/main/manaplus/manaApp/windows.ts b/src/main/manaplus/manaApp/windows.ts index a8a0ebd..87b61bd 100644 --- a/src/main/manaplus/manaApp/windows.ts +++ b/src/main/manaplus/manaApp/windows.ts @@ -87,8 +87,11 @@ export class ManaPlusAppWindows implements ManaPlusApp { Status.setProgress(500); Status.setActivity(`ManaPlus download completed. Unziping..`); - const extraction = new Promise((resolve, reject) => { - extract(updateDestination, { dir: this.path }, function (err) { + + const extraction = new Promise(async (resolve, reject) => { + try { + await extract(updateDestination, { dir: this.path }); + } catch (err) { if (err) { console.log(err); Status.showError( @@ -99,7 +102,7 @@ export class ManaPlusAppWindows implements ManaPlusApp { reject(new Error("Extraction Error")); } resolve(); - }); + } }); await extraction; -- cgit v1.2.3-60-g2f50