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

autoUpdater does not emit an error if quitAndInstall is called without an update to apply #3840

Closed
wearhere opened this issue Dec 16, 2015 · 3 comments

Comments

@wearhere
Copy link
Contributor

autoUpdater's docs say that quitAndInstall should only be called after 'update-downloaded' has been emitted, and if it is called before that is emitted, the app will quit but not reopen.

For both these reasons, autoUpdater should emit an error (and not proceed to quit) if quitAndInstall is called without an update to apply.

@wearhere
Copy link
Contributor Author

Tested by #3838. I would fix this, but I'm not sure if the fix needs to go in Electron or Squirrel.

@zcbenz
Copy link
Contributor

zcbenz commented Dec 17, 2015

Before someone cares to fix this, I think you can just check whether update-downloaded is fired before calling quitAndInstall.

@wearhere
Copy link
Contributor Author

Oh for sure. I just think that the auto-updater itself should enforce that restriction since seeing an error is better UX than seeing the app quit and it not come back.

(One simple though perhaps not-totally-correct way to fix this would be to have the auto-updater itself listen for 'update-downloaded' and only allow quitAndInstall to be called thereafter—is that what you were suggesting?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants