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

[feat] More event or api for updater #3605

Closed
zzzgydi opened this issue Mar 3, 2022 · 3 comments
Closed

[feat] More event or api for updater #3605

zzzgydi opened this issue Mar 3, 2022 · 3 comments

Comments

@zzzgydi
Copy link

zzzgydi commented Mar 3, 2022

Describe the problem

I want to kill the sidecar when the app has been downloaded and is going to be installed. Because I noticed that the sidecar does not quit when the app exit.

If I write my code below. I should restart my sidecar when the installer failed. Not only that, when my sidecar is providing some kind of service, and the service has to be stopped during the app update.

await killSidecars();
await installUpdate();
await relaunch();

If I do this like below. The sidecar does not be killed...

await installUpdate();
await killSidecars();
await relaunch();

Describe the solution you'd like

I see a todo tag in the code here. It will be helpful for me if done.

Or if there is a event like tauri://update-download, maybe this will work too. (But this may have a problem)

Further considerations, will it support to get the download progress, it only support the update-status: [ERROR/PENDING/DONE] right now.

Alternatives considered

No response

Additional context

No response

@lucasfernog
Copy link
Member

Let's fix the cleanup issue first :)

@lucasfernog
Copy link
Member

Changing how the update is download and installed is more complicated, we'll have to do it on another time. It'll also need to be audited again since the updater is one of the major security risks. But at least we can fix your issue.

@zzzgydi
Copy link
Author

zzzgydi commented Mar 5, 2022

Thanks for your help!!!

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