From f8041390dcea55bfa800d9e019c0867c57ed2279 Mon Sep 17 00:00:00 2001 From: Donnie Adams Date: Mon, 10 Jun 2024 16:44:51 -0400 Subject: [PATCH] fix: stop binding os.Stdin to sub commands Binding os.Stdin, which will not be closed in gptscript, causes issues with Windows because the subcommand will wait for stdin to be closed before launching. Since we are not using stdin with subcommands, this binding can safely be removed. Signed-off-by: Donnie Adams --- pkg/engine/cmd.go | 1 - 1 file changed, 1 deletion(-) diff --git a/pkg/engine/cmd.go b/pkg/engine/cmd.go index 39a3e0a1..48b2d2b8 100644 --- a/pkg/engine/cmd.go +++ b/pkg/engine/cmd.go @@ -73,7 +73,6 @@ func (e *Engine) runCommand(ctx Context, tool types.Tool, input string, toolCate output := &bytes.Buffer{} all := &bytes.Buffer{} - cmd.Stdin = os.Stdin cmd.Stderr = io.MultiWriter(all, os.Stderr) cmd.Stdout = io.MultiWriter(all, output)