Browse Source

fix(tests): only download update when it is available (#7061)

Lucas Fernandes Nogueira 2 years ago
parent
commit
154ccbe503
1 changed files with 5 additions and 3 deletions
  1. 5 3
      core/tests/app-updater/src/main.rs

+ 5 - 3
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);
           }