From 209f3372f7ff023a842a8d186130032397e5ad87 Mon Sep 17 00:00:00 2001 From: GeckoEidechse Date: Sat, 10 Sep 2022 16:49:59 +0200 Subject: Return error result type if NS update check fails --- src-tauri/src/main.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src-tauri') diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index 60b434fc..0b22eaff 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -113,7 +113,7 @@ fn get_northstar_version_number_caller(game_path: String) -> String { /// Checks if installed Northstar version is up-to-date /// false -> Northstar install is up-to-date /// true -> Northstar install is outdated -async fn check_is_northstar_outdated(game_path: String) -> bool { +async fn check_is_northstar_outdated(game_path: String) -> Result { let index = thermite::api::get_package_index().await.unwrap().to_vec(); let nmod = index .iter() @@ -128,16 +128,16 @@ async fn check_is_northstar_outdated(game_path: String) -> bool { Err(err) => { println!("{}", err); // If we fail to get new version just assume we are up-to-date - return false; + return Err(err.to_string()); } }; if version_number != nmod.version { println!("Installed Northstar version outdated"); - true + Ok(true) } else { println!("Installed Northstar version up-to-date"); - false + Ok(false) } } -- cgit v1.2.3