Skip to content

Commit cb20a2f

Browse files
author
Daniel Schwarz
committed
fix(desktop): refine window destruction logic before NSIS installer launch to prevent premature app.quit()
1 parent 9067f24 commit cb20a2f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/desktop/src/main.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,7 @@ async function installDownloadedUpdate(): Promise<{ accepted: boolean; completed
810810
clearUpdatePollTimer();
811811
try {
812812
await stopBackendAndWaitForExit();
813-
// Destroy all windows before launching the NSIS installer
813+
// Destroy all windows before launching the NSIS installer to avoid the installer finding live windows it needs to close.
814814
for (const win of BrowserWindow.getAllWindows()) {
815815
win.destroy();
816816
}
@@ -1392,7 +1392,7 @@ app
13921392
});
13931393

13941394
app.on("window-all-closed", () => {
1395-
if (process.platform !== "darwin") {
1395+
if (process.platform !== "darwin" && !isQuitting) {
13961396
app.quit();
13971397
}
13981398
});

0 commit comments

Comments
 (0)