fix(tests): backport updater test fix from tauri

https://github.com/tauri-apps/tauri/pull/7061
pull/404/head
Lucas Nogueira 2 years ago
parent a7cba0dac7
commit d0bd7b771b
No known key found for this signature in database
GPG Key ID: FFEA6C72E73482F1

@ -34,9 +34,11 @@ fn main() {
tauri::async_runtime::spawn(async move { tauri::async_runtime::spawn(async move {
match handle.updater().check().await { match handle.updater().check().await {
Ok(update) => { Ok(update) => {
if let Err(e) = update.download_and_install(|_event| {}).await { if update.is_update_available() {
println!("{e}"); if let Err(e) = update.download_and_install(|_event| {}).await {
std::process::exit(1); println!("{e}");
std::process::exit(1);
}
} }
std::process::exit(0); std::process::exit(0);
} }

Loading…
Cancel
Save