From 32e6dc853a52184f6b6cbcf7561cda23656cb1f3 Mon Sep 17 00:00:00 2001 From: Qiu Chaofan Date: Wed, 24 Apr 2024 10:39:19 +0800 Subject: [PATCH] Use uname -s to detect system name GNU style uname supports -o option, but AIX system's does not. Use -s to get system name, which is supported by both. --- os_info/src/aix/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os_info/src/aix/mod.rs b/os_info/src/aix/mod.rs index 45f79e1..c061837 100644 --- a/os_info/src/aix/mod.rs +++ b/os_info/src/aix/mod.rs @@ -29,7 +29,7 @@ fn get_version() -> Option { } fn get_os() -> Type { - match uname("-o").as_deref() { + match uname("-s").as_deref() { Some("AIX") => Type::AIX, _ => Type::Unknown, }