From 09674a0026b619b801805996fa7f5ae37062aa0e Mon Sep 17 00:00:00 2001 From: Yash Thakur <45539777+ysthakur@users.noreply.github.com> Date: Tue, 18 Mar 2025 19:02:04 -0400 Subject: [PATCH] Feature-gate `job unfreeze` behind "os" (#15339) # Description The `job unfreeze` command relies on the `os` feature of the `nu-protocol` crate, which means that `nu-command` doesn't compile with `--no-default-features`. This PR gates `job unfreeze` behind `nu-command`'s `os` feature to avoid this. No user-facing changes, no tests needed. --- crates/nu-command/src/default_context.rs | 2 +- crates/nu-command/src/experimental/mod.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/nu-command/src/default_context.rs b/crates/nu-command/src/default_context.rs index dfd7badbec..0c1b38182a 100644 --- a/crates/nu-command/src/default_context.rs +++ b/crates/nu-command/src/default_context.rs @@ -454,7 +454,7 @@ pub fn add_shell_command_context(mut engine_state: EngineState) -> EngineState { Job, }; - #[cfg(unix)] + #[cfg(all(unix, feature = "os"))] bind_command! { JobUnfreeze, } diff --git a/crates/nu-command/src/experimental/mod.rs b/crates/nu-command/src/experimental/mod.rs index 867cd6457e..ff4f6b0399 100644 --- a/crates/nu-command/src/experimental/mod.rs +++ b/crates/nu-command/src/experimental/mod.rs @@ -4,7 +4,7 @@ mod job_kill; mod job_list; mod job_spawn; -#[cfg(unix)] +#[cfg(all(unix, feature = "os"))] mod job_unfreeze; pub use is_admin::IsAdmin; @@ -14,5 +14,5 @@ pub use job_list::JobList; pub use job_spawn::JobSpawn; -#[cfg(unix)] +#[cfg(all(unix, feature = "os"))] pub use job_unfreeze::JobUnfreeze;