-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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: quitAndInstall not working on macOS with autoInstallOnAppQuit=false #6390
Conversation
🦋 Changeset detectedLatest commit: 3108cd7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
- Would never call nativeUpdater.checkForUpdates() if not installing on quit. Thus neither squirrelDownloadedUpdate was true nor the nativeUpdater's event "update-downloaded" be emitted. Leading to nothing happening. - This commit fixes it by calling the checkForUpdates() in MacUpdater.quitAndInstall() when necessary Signed-off-by: Sebastian Malton <sebastian@malton.name>
Signed-off-by: Sebastian Malton <sebastian@malton.name>
Hey, We also just found out a fix for that issue, which seems actually better. quitAndInstall(): void {
if (this.squirrelDownloadedUpdate) {
// Update already fetched by Squirrel, it's ready to install
this.nativeUpdater.quitAndInstall()
} else {
// Quit and install as soon as Squirrel get the update
this.nativeUpdater.on("update-downloaded", () => {
this.nativeUpdater.quitAndInstall()
})
// And trigger the update
if (!this.autoInstallOnAppQuit) {
this.nativeUpdater.checkForUpdates();
}
} This is a very urgent issue @mmaietta and should be put in pre-release as soon as possible, It's affecting all our userbase. |
Yeah I was really surprised that there was no reported issue about this after I figured out what was going on. I agree that yours is probably slightly more resilient, will update. |
Oh man, I'm so behind on my notifications. Will get this in ASAP @Nokel81, I think you were going to update the PR first? |
Signed-off-by: Sebastian Malton <sebastian@malton.name>
@mmaietta Done |
Released next: |
Would never call nativeUpdater.checkForUpdates() if not installing on
quit. Thus neither squirrelDownloadedUpdate was true nor the
nativeUpdater's event "update-downloaded" be emitted. Leading to
nothing happening.
This commit fixes it by calling the checkForUpdates() in
MacUpdater.quitAndInstall() when necessary
Signed-off-by: Sebastian Malton sebastian@malton.name
fixes #6389