-
Notifications
You must be signed in to change notification settings - Fork 327
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
[bug] Update fails on Windows when constructing the updater using the UpdaterBuilder directly #2335
Comments
It's indeed not a use-case we considered yet for this plugin. But even for tauri apps this is something we need to fix because UpdaterBuilder is exposed and it's just "recommended" to use updater_builder() |
@talzion12 if you don't use tauri, maybe take a look at |
@amrbashir I will, thanks! |
I migrated my code to cargo-packager but ultimately decided to revert and stick with Tauri for my project. For now I created a fork that simply makes the I see 2 possible solutions to not panic when current_exe_args is not set:
Let me know what you think and if you have another solution in mind. |
I think we can just fix the underlying issue of indexing an array without checking its length, we should even skip passing Moreover I think we can expose |
@amrbashir I created a pr that fixes the panic and also doesn't pass the I wasn't sure how to implement the This introduces a potentially breaking change in the case that the Same goes for the LAUNCHAPPARGS that is not passed now. I don't think the MSIs should behave differently based on the existence of this argument, but still I think it could be a breaking change so we may want to keep the older behavior of just passing Let me know what you think. |
I see that since updater 2.5.0 |
I'm using the
UpdaterBuilder
to construct anUpdater
and initiate an update but I'm getting a panic error:range start index 1 out of range for slice of length 0
intauri-plugin-updater-2.3.1\src\updater.rs:616:52
.It seems to be because the
UpdaterBuilder::current_exe_args
is empty and it's not possible to change it from outside the crate.The reason I'm using the
UpdaterBuilder
directly and not usingUpdaterExt
is because I only want to use the update functionality but I'm otherwise not using tauri and I don't want to construct aRuntime
. Is this kind of use not supported?The text was updated successfully, but these errors were encountered: