| ... | ... | @@ -810,7 +810,11 @@ async function installDownloadedUpdate(): Promise<{ accepted: boolean; completed |
| 810 | 810 | clearUpdatePollTimer(); |
| 811 | 811 | try { |
| 812 | 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); |
| 814 | 818 | return { accepted: true, completed: true }; |
| 815 | 819 | } catch (error: unknown) { |
| 816 | 820 | const message = formatErrorMessage(error); |
| ... | ... | @@ -1390,7 +1394,7 @@ app |
| 1390 | 1394 | }); |
| 1391 | 1395 | |
| 1392 | 1396 | app.on("window-all-closed", () => { |
| 1393 | | if (process.platform !== "darwin") { |
| 1397 | if (process.platform !== "darwin" && !isQuitting) { |
| 1394 | 1398 | app.quit(); |
| 1395 | 1399 | } |
| 1396 | 1400 | }); |