Skip to content

Commit 15c106f

Browse files
committed
fix: mac auto updater
1 parent 566ac91 commit 15c106f

File tree

1 file changed

+4
-9
lines changed
  • src/extensionsIntegrated/appUpdater

1 file changed

+4
-9
lines changed

src/extensionsIntegrated/appUpdater/main.js

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -341,15 +341,10 @@ define(function (require, exports, module) {
341341
}
342342
const removeCommand = new window.__TAURI__.shell
343343
.Command(`recursive-rm-unix`, ['-r', currentAppPath]);
344-
let result;
345-
try {
346-
result = removeCommand.execute();
347-
if(result.code !== 0){
348-
console.error("Could not remove old app", currentAppPath, "Trying to overwrite");
349-
}
350-
} catch (e) {
351-
// we dont fail here, we will try to overwrite now.
352-
console.error("Could not remove old app", currentAppPath, "Trying to overwrite", e);
344+
let result = await removeCommand.execute();
345+
if(result.code !== 0){
346+
console.error("Could not remove old app: ", currentAppPath);
347+
throw new Error("Could not remove old app: " + currentAppPath);
353348
}
354349
const copyCommand = new window.__TAURI__.shell
355350
.Command(`recursive-copy-unix`, ['-r', installerLocation, currentAppPath]);

0 commit comments

Comments
 (0)