Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix restart behavior for "Restart and Install Update" on macOS #18775

merged 1 commit into from Feb 4, 2019


Copy link

@daviwil daviwil commented Feb 2, 2019

Identify the Bug

Fixes #17976

Description of the Change

This change introduces an additional boolean property on AtomApplication called quittingForUpdate which indicates that Atom is quitting due to a pending update. This property is then used in the close handler on AtomWindow so that Atom isn't prevented from shutting down when this.quitting is set to true.

Alternate Designs

It's possible that a better design could be found through refactoring Atom's shutdown logic, but that approach is much more likely to introduce new regressions and unexpected behavior.

Possible Drawbacks

This solution is simple enough that it shouldn't have any drawbacks other than the introduction of another boolean flag. The upside, however, is that this boolean only needs to be checked in one place and the rest of Atom's shutdown logic can be totally oblivious to it.

Verification Process

  • Ensure that Atom quits and restarts when "Restart and Install Update" is clicked in either the application menu or on the About page
  • Ensure that project state is restored correctly after Atom restarts for the update
  • Ensure that normal Atom shutdown (Atom -> Quit) is not impacted by this change

Release Notes

On macOS, Atom now restarts correctly when installing new updates with "Restart and Install Update"

@daviwil daviwil merged commit 6e39fe3 into master Feb 4, 2019
3 checks passed
3 checks passed
Atom Pull Requests #20190202.5 succeeded
continuous-integration/appveyor/pr AppVeyor build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed
@daviwil daviwil deleted the dw-fix-macos-update-restart branch Feb 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet
Linked issues

Successfully merging this pull request may close these issues.

1 participant