aboutsummaryrefslogtreecommitdiff
path: root/src-tauri/src/lib.rs
diff options
context:
space:
mode:
authorGeckoEidechse <gecko.eidechse+git@pm.me>2022-09-10 23:26:21 +0200
committerGeckoEidechse <gecko.eidechse+git@pm.me>2022-09-10 23:26:21 +0200
commit54e5b393128f6df4c013ff0866349cce4291d7b5 (patch)
tree27a9b9fa12dff3579aed72fd78bfe7ef5e141688 /src-tauri/src/lib.rs
parent9d3f82e13a73998f508ba65ef4076fb79982b13c (diff)
downloadFlightCore-54e5b393128f6df4c013ff0866349cce4291d7b5.tar.gz
FlightCore-54e5b393128f6df4c013ff0866349cce4291d7b5.zip
Move get host OS function to lib.rs
Diffstat (limited to 'src-tauri/src/lib.rs')
-rw-r--r--src-tauri/src/lib.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs
index da1ba9b8..d1073387 100644
--- a/src-tauri/src/lib.rs
+++ b/src-tauri/src/lib.rs
@@ -1,3 +1,5 @@
+use std::env;
+
use anyhow::{anyhow, Context, Result};
use powershell_script::PsScriptBuilder;
use regex::Regex;
@@ -244,3 +246,8 @@ pub async fn install_northstar(game_path: &str) -> Result<String> {
Ok(nmod.version.clone())
}
+
+/// Returns identifier of host OS FlightCore is running on
+pub fn get_host_os() -> String {
+ env::consts::OS.to_string()
+}