File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -677,12 +677,12 @@ ipcMain.handle('agent:restart', async () => {
677677
678678// Auto-updater: quit and install the downloaded update
679679ipcMain . 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)
You can’t perform that action at this time.
0 commit comments