aboutsummaryrefslogtreecommitdiff
path: root/src-tauri/src/platform_specific
diff options
context:
space:
mode:
authorGeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com>2023-10-13 02:49:43 +0200
committerGitHub <noreply@github.com>2023-10-13 02:49:43 +0200
commit475ddbbede706624f6b332c06a035f2319a88f8e (patch)
tree2e15fb01cf7501844700ba7090ee80abff819a1a /src-tauri/src/platform_specific
parentf515a3b702f781c0da438840071def1b37d2e1bc (diff)
downloadFlightCore-475ddbbede706624f6b332c06a035f2319a88f8e.tar.gz
FlightCore-475ddbbede706624f6b332c06a035f2319a88f8e.zip
refactor: Move `get_host_os` to module (#618)
In an effort to clean up `main.rs`
Diffstat (limited to 'src-tauri/src/platform_specific')
-rw-r--r--src-tauri/src/platform_specific/mod.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src-tauri/src/platform_specific/mod.rs b/src-tauri/src/platform_specific/mod.rs
index d5acfde8..8dca9424 100644
--- a/src-tauri/src/platform_specific/mod.rs
+++ b/src-tauri/src/platform_specific/mod.rs
@@ -4,6 +4,12 @@ pub mod windows;
#[cfg(target_os = "linux")]
pub mod linux;
+/// Returns identifier of host OS FlightCore is running on
+#[tauri::command]
+pub fn get_host_os() -> String {
+ std::env::consts::OS.to_string()
+}
+
/// On Linux attempts to install NorthstarProton
/// On Windows simply returns an error message
#[tauri::command]