Skip to content

fix(desktop): ensure all windows are destroyed before launching the NSIS installer during update process#1461

Open
danielss-dev wants to merge 2 commits intopingdotgg:mainfrom
danielss-dev:developments/bug-1460-update-electron-app
Open

fix(desktop): ensure all windows are destroyed before launching the NSIS installer during update process#1461
danielss-dev wants to merge 2 commits intopingdotgg:mainfrom
danielss-dev:developments/bug-1460-update-electron-app

Conversation

@danielss-dev
Copy link
Copy Markdown

@danielss-dev danielss-dev commented Mar 27, 2026

What Changed

Fix bug: #1460

Why

Common pattern in Electron apps using electron-updater with NSIS on Windows.

Change can be done in one-liner but, is easier to understand this way.
BrowserWindow.getAllWindows().forEach(w => w.close());

UI Changes

No UI Changes

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Note

Destroy all windows before launching the NSIS installer during desktop app update

  • In installDownloadedUpdate in main.ts, all BrowserWindow instances are now explicitly destroyed before invoking the updater, preventing stale windows from blocking the NSIS installer.
  • autoUpdater.quitAndInstall is now called with (true, true) instead of no arguments to force quit and silent install.
  • The window-all-closed handler is updated to skip app.quit() when isQuitting is already true on non-macOS platforms, avoiding a double-quit during the update flow.

Macroscope summarized cb20a2f.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 27, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: b713a34c-5b32-410d-81d6-ca2e33d184fc

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant