diff options
author | GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com> | 2023-10-13 02:49:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-13 02:49:43 +0200 |
commit | 475ddbbede706624f6b332c06a035f2319a88f8e (patch) | |
tree | 2e15fb01cf7501844700ba7090ee80abff819a1a /src-tauri/src/platform_specific | |
parent | f515a3b702f781c0da438840071def1b37d2e1bc (diff) | |
download | FlightCore-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.rs | 6 |
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] |