Skip to content

Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows

Sets stdin to null for streamed commands

Maximilian Roos6e0d040f9fd4
diff --git a/src/output/handlers.rs b/src/output/handlers.rs
index d41165cb0..169b10530 100644
--- a/src/output/handlers.rs
+++ b/src/output/handlers.rs
@@ -357,8 +357,9 @@ pub(crate) fn execute_streaming(
.arg("-c")
.arg(&command_to_run)
.current_dir(working_dir)
- // Use Stdio::inherit() to preserve TTY behavior
- // This prevents commands like cargo from buffering output
+ .stdin(std::process::Stdio::null()) // Null stdin - child gets EOF immediately
+ .stdout(std::process::Stdio::inherit()) // Preserve TTY for output
+ .stderr(std::process::Stdio::inherit()) // Preserve TTY for errors
.spawn()
.map_err(|e| io::Error::other(format!("Failed to execute command: {}", e)))?;