The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 25, 07:30 UTC
fix(desktop): ensure all windows are destroyed before launching the NSIS installer during update process (#1461)
Co-authored-by: Daniel Schwarz <daniel.schwarz@serviceware-se.com>
Daniels committed
Mar 28, 2026 at 19:51 UTC
52fa6a733342a2e5c5d421e90c8f31755fb76395
1 file changed
+6
-2
apps/desktop/src/main.ts
+6
-2
@@ -810,7 +810,11 @@ async function installDownloadedUpdate(): Promise<{ accepted: boolean; completed
810
clearUpdatePollTimer();
811
try {
812
await stopBackendAndWaitForExit();
813
- autoUpdater.quitAndInstall();
813
+ // Destroy all windows before launching the NSIS installer to avoid the installer finding live windows it needs to close.
814
+ for (const win of BrowserWindow.getAllWindows()) {
815
+ win.destroy();
816
+ }
817
+ autoUpdater.quitAndInstall(true, true);
818
return { accepted: true, completed: true };
819
} catch (error: unknown) {
820
const message = formatErrorMessage(error);
@@ -1390,7 +1394,7 @@ app
1394
});
1395
1396
app.on("window-all-closed", () => {
1393
- if (process.platform !== "darwin") {
1397
+ if (process.platform !== "darwin" && !isQuitting) {
1398
app.quit();
1399
}
1400
});