mirror of
https://github.com/tealdeer-rs/tealdeer.git
synced 2026-08-09 09:49:10 +02:00
OS detection: Treat BSDs as "osx" (#58)
Since macOS is also a BSD under the hood, this will probably yield better results.
This commit is contained in:
parent
1dc3e0c8c4
commit
e73261542c
1 changed files with 11 additions and 2 deletions
13
src/main.rs
13
src/main.rs
|
|
@ -199,12 +199,21 @@ fn get_os() -> OsType {
|
|||
OsType::Linux
|
||||
}
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
#[cfg(any(target_os = "macos",
|
||||
target_os = "freebsd",
|
||||
target_os = "netbsd",
|
||||
target_os = "openbsd",
|
||||
target_os = "dragonfly"))]
|
||||
fn get_os() -> OsType {
|
||||
OsType::OsX
|
||||
}
|
||||
|
||||
#[cfg(not(any(target_os = "linux", target_os = "macos")))]
|
||||
#[cfg(not(any(target_os = "linux",
|
||||
target_os = "macos",
|
||||
target_os = "freebsd",
|
||||
target_os = "netbsd",
|
||||
target_os = "openbsd",
|
||||
target_os = "dragonfly")))]
|
||||
fn get_os() -> OsType {
|
||||
OsType::Other
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue