Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.
fix(desktop): ensure all windows are destroyed before launching the NSIS installer during update process (#1461)
Daniels52fa6a733342
diff --git a/apps/desktop/src/main.ts b/apps/desktop/src/main.tsindex c718a3127..9e2950462 100644--- a/apps/desktop/src/main.ts+++ b/apps/desktop/src/main.ts@@ -810,7 +810,11 @@ async function installDownloadedUpdate(): Promise<{ accepted: boolean; completedclearUpdatePollTimer();try {await stopBackendAndWaitForExit();- autoUpdater.quitAndInstall();+ // Destroy all windows before launching the NSIS installer to avoid the installer finding live windows it needs to close.+ for (const win of BrowserWindow.getAllWindows()) {+ win.destroy();+ }+ autoUpdater.quitAndInstall(true, true);return { accepted: true, completed: true };} catch (error: unknown) {const message = formatErrorMessage(error);@@ -1390,7 +1394,7 @@ app});app.on("window-all-closed", () => {- if (process.platform !== "darwin") {+ if (process.platform !== "darwin" && !isQuitting) {app.quit();}});