Skip to content

Commit

Permalink
Use uname -s to detect system name
Browse files Browse the repository at this point in the history
GNU style uname supports -o option, but AIX system's does not. Use -s to
get system name, which is supported by both.
  • Loading branch information
ecnelises committed Apr 24, 2024
1 parent 3d131a7 commit 32e6dc8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion os_info/src/aix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ fn get_version() -> Option<String> {
}

fn get_os() -> Type {
match uname("-o").as_deref() {
match uname("-s").as_deref() {
Some("AIX") => Type::AIX,
_ => Type::Unknown,
}
Expand Down

0 comments on commit 32e6dc8

Please sign in to comment.