mirror of
https://github.com/nushell/nushell.git
synced 2025-08-09 06:45:59 +02:00
Fix build on *BSD, illumos, etc. (#6456)
* nu-path: use 'linux' code on all non-macOS unix * nu-command: cfg() the Ps command to platforms it's actually implemented on * nu-system: cfg() the Ps test to the platforms Ps is implemented on
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
#[cfg(target_os = "linux")]
|
||||
#[cfg(all(unix, not(target_os = "macos")))]
|
||||
use pwd::Passwd;
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
@ -45,7 +45,7 @@ fn expand_tilde_with_home(path: impl AsRef<Path>, home: Option<PathBuf>) -> Path
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
#[cfg(all(unix, not(target_os = "macos")))]
|
||||
fn user_home_dir(username: &str) -> PathBuf {
|
||||
let passwd = Passwd::from_name(username);
|
||||
match &passwd.ok() {
|
||||
|
Reference in New Issue
Block a user