diff options
author | GeckoEidechse <gecko.eidechse+git@pm.me> | 2022-09-10 16:49:59 +0200 |
---|---|---|
committer | GeckoEidechse <gecko.eidechse+git@pm.me> | 2022-09-10 16:49:59 +0200 |
commit | 209f3372f7ff023a842a8d186130032397e5ad87 (patch) | |
tree | 21927aadcc9eab2a5f258dcac9c2221ebd4b24bf /src-tauri/src | |
parent | 50a96674c08b3cfd14715789317cf3c7b0e2dffc (diff) | |
download | FlightCore-209f3372f7ff023a842a8d186130032397e5ad87.tar.gz FlightCore-209f3372f7ff023a842a8d186130032397e5ad87.zip |
Return error result type if NS update check fails
Diffstat (limited to 'src-tauri/src')
-rw-r--r-- | src-tauri/src/main.rs | 8 |
1 files changed, 4 insertions, 4 deletions
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<bool, String> { 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) } } |