From 4b1ba07943bda841f5f9be135ac9f1e5f504eafa Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Sun, 11 Oct 2026 16:05:25 -0300 Subject: [PATCH] fix(updater): report install as unsupported on mobile (#3695) `#[cfg(mobile)] fn install_inner` returned `Ok(())` without doing anything. `check` already fails with `UnsupportedOs` there unless a Rust caller sets a custom target, in which case a download was followed by a successful "install" that did nothing. It now returns `Error::UnsupportedOs`, the error `check` uses. Verified with clippy for aarch64-linux-android (the iOS build needs the Swift package, which does not build here). plugins/updater/src/updater.rs --- .changes/updater-mobile-install-error.md | 6 ++++++ plugins/updater/src/updater.rs | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 .changes/updater-mobile-install-error.md diff --git a/.changes/updater-mobile-install-error.md b/.changes/updater-mobile-install-error.md new file mode 100644 index 000000000..0ce7b0af3 --- /dev/null +++ b/.changes/updater-mobile-install-error.md @@ -0,0 +1,6 @@ +--- +updater: patch +updater-js: patch +--- + +On Android and iOS, `Update::install` now returns `Error::UnsupportedOs` instead of reporting success without installing anything. diff --git a/plugins/updater/src/updater.rs b/plugins/updater/src/updater.rs index a9d1fae24..71e124b0e 100644 --- a/plugins/updater/src/updater.rs +++ b/plugins/updater/src/updater.rs @@ -928,9 +928,10 @@ impl Update { self.install_inner(&bytes) } + /// Updates are not supported on mobile, where apps are updated through the app stores. #[cfg(mobile)] fn install_inner(&self, _bytes: &[u8]) -> Result<()> { - Ok(()) + Err(Error::UnsupportedOs) } /// Whether the Windows installer should restart the app after installed, default is `true`