diff options
Diffstat (limited to 'src-tauri/src/lib.rs')
-rw-r--r-- | src-tauri/src/lib.rs | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index 6a44514d..c2007130 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -46,17 +46,25 @@ pub fn check_mod_version_number(path_to_mod_folder: String) -> Result<String, an // for now tho it only checks `ldd --version` // - salmon -pub fn linux_checks_librs() -> bool { - let mut linux_compatible: bool = true; // a variable that starts true and will be set to false if any of the checks arent met +pub fn linux_checks_librs() -> Result<(), String> { + // Perform various checks in terms of Linux compatibility + // Return early with error message if a check fails // check `ldd --version` to see if glibc is up to date for northstar proton + let min_required_ldd_version = 2.33; let lddv = linux::check_glibc_v(); - if lddv < 2.33 { linux_compatible = false }; + if lddv < min_required_ldd_version { + return Err(format!( + "GLIBC is not version {} or greater", + min_required_ldd_version + ) + .to_string()); + }; - return linux_compatible; + // All checks passed + Ok(()) } - /// Attempts to find the game install location pub fn find_game_install_location() -> Result<GameInstall, anyhow::Error> { // Attempt parsing Steam library directly |