nushell/crates/nu-system/src/os_info.rs
nibon7 7e26b4fcc2
Bump sysinfo from 0.29 to 0.30 (#11484)
# Description
Bumps `sysinfo` to 0.30.

* Changelog
 https://github.com/GuillaumeGomez/sysinfo/blob/master/CHANGELOG.md#0304

# User-Facing Changes
N/A
2024-01-05 05:31:29 -06:00

18 lines
364 B
Rust

pub fn get_os_name() -> &'static str {
std::env::consts::OS
}
pub fn get_os_arch() -> &'static str {
std::env::consts::ARCH
}
pub fn get_os_family() -> &'static str {
std::env::consts::FAMILY
}
pub fn get_kernel_version() -> String {
match sysinfo::System::kernel_version() {
Some(v) => v,
None => "unknown".to_string(),
}
}