Skip to content

Commit 3bf39ce

Browse files
authored
fix: app updater quit and install not working (#659)
* fix: app updater quit and install not working electron-userland/electron-builder#1604 * docs(changeset): Fixed app updater quit and install
1 parent b444fb8 commit 3bf39ce

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

.changeset/poor-humans-film.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@krud-dev/ostara-main": patch
3+
---
4+
5+
Fixed app updater quit and install

app/src/infra/autoupdate/appUpdater.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,14 @@ export class AppUpdater {
7575
}
7676

7777
quitAndInstall() {
78-
autoUpdater.quitAndInstall();
78+
setImmediate(() => {
79+
app.removeAllListeners('window-all-closed');
80+
BrowserWindow.getAllWindows().forEach((window) => {
81+
window.removeAllListeners('close');
82+
window.close();
83+
});
84+
autoUpdater.quitAndInstall(false);
85+
});
7986
}
8087

8188
private async checkForUpdatesJob(runAnyways = false) {

0 commit comments

Comments
 (0)