Skip to content

Commit

Permalink
fix: app updater quit and install not working (#659)
Browse files Browse the repository at this point in the history
* fix: app updater quit and install not working

electron-userland/electron-builder#1604

* docs(changeset): Fixed app updater quit and install
  • Loading branch information
avivm authored Jul 4, 2023
1 parent b444fb8 commit 3bf39ce
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/poor-humans-film.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@krud-dev/ostara-main": patch
---

Fixed app updater quit and install
9 changes: 8 additions & 1 deletion app/src/infra/autoupdate/appUpdater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,14 @@ export class AppUpdater {
}

quitAndInstall() {
autoUpdater.quitAndInstall();
setImmediate(() => {
app.removeAllListeners('window-all-closed');
BrowserWindow.getAllWindows().forEach((window) => {
window.removeAllListeners('close');
window.close();
});
autoUpdater.quitAndInstall(false);
});
}

private async checkForUpdatesJob(runAnyways = false) {
Expand Down

0 comments on commit 3bf39ce

Please sign in to comment.