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

Feature Request: Disable Auto-Install of Electron Auto-Updater #3742

Closed
3 tasks done
maoryadin opened this issue Oct 21, 2024 · 3 comments
Closed
3 tasks done

Feature Request: Disable Auto-Install of Electron Auto-Updater #3742

maoryadin opened this issue Oct 21, 2024 · 3 comments

Comments

@maoryadin
Copy link

Pre-flight checklist

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project uses.
  • I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Problem description

The current auto-updater mechanism in Electron automatically installs updates as soon as they are downloaded/app quit.
This behavior is not always desirable, as it might install an update even if the user has not wanted so.

I want to have more control over the timing of when the update gets installed. Specifically, I would like to disable the auto-install feature and only trigger the installation on my own terms, such as through a user action.

Currently, there is no built-in way to prevent the auto-install behavior, and there doesn’t seem to be any configuration option that offers this control.

Proposed solution

Introduce a new configuration option in the autoUpdater API, for example:

autoUpdater.autoInstallOnAppQuit = false;

his option would:

•	Allow developers to disable automatic installation after the update is downloaded.
•	Provide flexibility to manage when the update is applied, such as manually triggering it based on user input or when the app closes.

Alternatives considered

Manual use of autoUpdater.quitAndInstall function.

Additional information

No response

@MarshallOfSound
Copy link
Member

Unfortunately this is not compatible with, nor offered by, the update systems that Electron uses under the hood. Both Squirrel.Mac and Squirrel.Windows will place the files in the requisite location on disk the second they are downloaded.

If you want to delay this actual install, delay the actual download / check for updates until the user interaction you wish to gate it behind

@MarshallOfSound MarshallOfSound closed this as not planned Won't fix, can't repro, duplicate, stale Oct 21, 2024
@maoryadin
Copy link
Author

Unfortunately this is not compatible with, nor offered by, the update systems that Electron uses under the hood. Both Squirrel.Mac and Squirrel.Windows will place the files in the requisite location on disk the second they are downloaded.

If you want to delay this actual install, delay the actual download / check for updates until the user interaction you wish to gate it behind

How can i delay the actual download? i mean i would like to check for update, do not download it, ask the user if he would like, and then download it.

@justgo97
Copy link

Unfortunately this is not compatible with, nor offered by, the update systems that Electron uses under the hood. Both Squirrel.Mac and Squirrel.Windows will place the files in the requisite location on disk the second they are downloaded.
If you want to delay this actual install, delay the actual download / check for updates until the user interaction you wish to gate it behind

How can i delay the actual download? i mean i would like to check for update, do not download it, ask the user if he would like, and then download it.

I assume you are using https://github.com/electron/update-electron-app to handle updates in your app and Github to host the release files, You will have to update the implementation so that it shows a prompt to the user before downloading the update, I have tested something similar not so long ago, You can check the code to get an idea of how to do it https://github.com/justgo97/electron-inline-updater

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

No branches or pull requests

3 participants