From 0f480d0985b3cdd2a0427340ac0c49324d31a9c2 Mon Sep 17 00:00:00 2001 From: Lucas Fernandes Nogueira Date: Sat, 27 May 2023 04:39:54 -0700 Subject: [PATCH] fix(tests): backport updater test fix from tauri (#404) --- plugins/updater/tests/app-updater/src/main.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/updater/tests/app-updater/src/main.rs b/plugins/updater/tests/app-updater/src/main.rs index b08d8df9..5b5a868a 100644 --- a/plugins/updater/tests/app-updater/src/main.rs +++ b/plugins/updater/tests/app-updater/src/main.rs @@ -34,9 +34,11 @@ fn main() { tauri::async_runtime::spawn(async move { match handle.updater().check().await { Ok(update) => { - if let Err(e) = update.download_and_install(|_event| {}).await { - println!("{e}"); - std::process::exit(1); + if update.is_update_available() { + if let Err(e) = update.download_and_install(|_event| {}).await { + println!("{e}"); + std::process::exit(1); + } } std::process::exit(0); }