mirror of
https://github.com/nushell/nushell.git
synced 2025-06-30 22:50:14 +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:
@ -160,10 +160,17 @@ pub fn create_default_context() -> EngineState {
|
||||
Exec,
|
||||
External,
|
||||
NuCheck,
|
||||
Ps,
|
||||
Sys,
|
||||
};
|
||||
|
||||
#[cfg(any(
|
||||
target_os = "android",
|
||||
target_os = "linux",
|
||||
target_os = "macos",
|
||||
target_os = "windows"
|
||||
))]
|
||||
bind_command! { Ps };
|
||||
|
||||
#[cfg(feature = "which-support")]
|
||||
bind_command! { Which };
|
||||
|
||||
|
@ -2,6 +2,12 @@ mod benchmark;
|
||||
mod complete;
|
||||
mod exec;
|
||||
mod nu_check;
|
||||
#[cfg(any(
|
||||
target_os = "android",
|
||||
target_os = "linux",
|
||||
target_os = "macos",
|
||||
target_os = "windows"
|
||||
))]
|
||||
mod ps;
|
||||
mod run_external;
|
||||
mod sys;
|
||||
@ -11,6 +17,12 @@ pub use benchmark::Benchmark;
|
||||
pub use complete::Complete;
|
||||
pub use exec::Exec;
|
||||
pub use nu_check::NuCheck;
|
||||
#[cfg(any(
|
||||
target_os = "android",
|
||||
target_os = "linux",
|
||||
target_os = "macos",
|
||||
target_os = "windows"
|
||||
))]
|
||||
pub use ps::Ps;
|
||||
pub use run_external::{External, ExternalCommand};
|
||||
pub use sys::Sys;
|
||||
|
Reference in New Issue
Block a user