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`