Skip to content

Commit

Permalink
fix: Set stdin to null in shell/bash tools (#568)
Browse files Browse the repository at this point in the history
  • Loading branch information
baxen authored Jan 10, 2025
1 parent 7b827d0 commit 9210de0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions crates/goose-mcp/src/developer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ impl DeveloperRouter {
let child = Command::new("bash")
.stdout(Stdio::piped()) // These two pipes required to capture output later.
.stderr(Stdio::piped())
.stdin(Stdio::null())
.kill_on_drop(true) // Critical so that the command is killed when the agent.reply stream is interrupted.
.arg("-c")
.arg(cmd_with_redirect)
Expand Down
1 change: 1 addition & 0 deletions crates/goose-mcp/src/developer2/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ impl Developer2Router {
let child = Command::new("bash")
.stdout(Stdio::piped()) // These two pipes required to capture output later.
.stderr(Stdio::piped())
.stdin(Stdio::null())
.kill_on_drop(true) // Critical so that the command is killed when the agent.reply stream is interrupted.
.arg("-c")
.arg(cmd_with_redirect)
Expand Down

0 comments on commit 9210de0

Please sign in to comment.