Skip to content

Commit f1d362c

Browse files
committed
fix: replace unreliable autoUpdater.quitAndInstall with manual app relaunch and exit on macOS
1 parent 4cac776 commit f1d362c

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

electron/main.cjs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -677,12 +677,12 @@ ipcMain.handle('agent:restart', async () => {
677677

678678
// Auto-updater: quit and install the downloaded update
679679
ipcMain.handle('updater:install', () => {
680-
// Stop the agent server before quitting
680+
console.log('[Electron] updater:install called — quitting and installing update');
681681
stopAgentServer();
682-
// Force quit on macOS (which normally keeps apps alive after closing windows)
683-
app.removeAllListeners('window-all-closed');
684-
// isSilent=false (show installer), isForceRunAfter=true (relaunch after install)
685-
autoUpdater.quitAndInstall(false, true);
682+
// autoUpdater.quitAndInstall is unreliable on macOS — do it manually
683+
autoUpdater.autoInstallOnAppQuit = true;
684+
app.relaunch();
685+
app.exit(0);
686686
});
687687

688688
// Let renderer check if an update was already downloaded (survives page refresh)

0 commit comments

Comments
 (0)