From 9c7837321024c99c5c9b738abbbd94f6e9caef69 Mon Sep 17 00:00:00 2001 From: asto18089 Date: Wed, 23 Sep 2026 06:38:04 +0800 Subject: [PATCH] fix(tools): gate the unix-only process test helpers for windows builds The bounded-child regression test in tools/process.rs is #[cfg(unix)] (it drives a real `sh` and a backgrounded grandchild holding the pipes), but the module-level `use super::*` and the `shell_command` helper it feeds on stayed ungated. Under cfg(test) on Windows the test is compiled out and the leftovers trip `-D warnings` (unused import + dead code), which is how pinjou-agent#595's windows-rust-test caught it after the 2026-09-22/23 batch landed (#63 introduced the module). Gate both items with #[cfg(unix)] so the module is empty rather than broken on Windows; no behavior change on unix targets. Signed-off-by: asto18089 --- crates/tui/src/tools/process.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/tui/src/tools/process.rs b/crates/tui/src/tools/process.rs index 16445f5988..bbb5055d60 100644 --- a/crates/tui/src/tools/process.rs +++ b/crates/tui/src/tools/process.rs @@ -199,8 +199,10 @@ pub(crate) fn stdin_json(input: &Value) -> Result, ToolError> { #[cfg(test)] mod tests { + #[cfg(unix)] use super::*; + #[cfg(unix)] fn shell_command(script: &str) -> tokio::process::Command { let mut cmd = tokio::process::Command::new("sh"); cmd.arg("-c").arg(script);