mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-23 18:54:21 +01:00
fix: rg hanging forever when run in bash, waiting for stdin (#3103)
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import z from "zod/v4"
|
||||
import { exec } from "child_process"
|
||||
|
||||
import { spawn } from "child_process"
|
||||
import { Tool } from "./tool"
|
||||
import DESCRIPTION from "./bash.txt"
|
||||
import { Permission } from "../permission"
|
||||
@@ -146,9 +145,11 @@ export const BashTool = Tool.define("bash", {
|
||||
})
|
||||
}
|
||||
|
||||
const process = exec(params.command, {
|
||||
const process = spawn(params.command, {
|
||||
shell: true,
|
||||
cwd: Instance.directory,
|
||||
signal: ctx.abort,
|
||||
stdio: ["ignore", "pipe", "pipe"],
|
||||
timeout,
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user