From 154ccbe503ba3566d43297fd44ee19e75dcbcd2e Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Thu, 25 May 2023 17:22:55 -0700 Subject: [PATCH] fix(tests): only download update when it is available (#7061) --- core/tests/app-updater/src/main.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/core/tests/app-updater/src/main.rs b/core/tests/app-updater/src/main.rs index 55b184eae..94c27bcb4 100644 --- a/core/tests/app-updater/src/main.rs +++ b/core/tests/app-updater/src/main.rs @@ -27,9 +27,11 @@ fn main() { tauri::async_runtime::spawn(async move { match handle.updater().check().await { Ok(update) => { - if let Err(e) = update.download_and_install().await { - println!("{e}"); - std::process::exit(1); + if update.is_update_available() { + if let Err(e) = update.download_and_install().await { + println!("{e}"); + std::process::exit(1); + } } std::process::exit(0); }