fix(tests): backport updater test fix from tauri (#404)

This commit is contained in:
Lucas Fernandes Nogueira
2023-05-27 04:39:54 -07:00
committed by GitHub
parent a7cba0dac7
commit 0f480d0985
@@ -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);
}