From 54fa2ca93d4a791ce098b560439095c49f3c05b4 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 21 Jul 2026 12:45:26 +0800 Subject: [PATCH] fix: merge os.Environ() with custom env in NewStdioTransport --- internal/plugins/mcp/stdio.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/plugins/mcp/stdio.go b/internal/plugins/mcp/stdio.go index 2020532..d3f0f6f 100644 --- a/internal/plugins/mcp/stdio.go +++ b/internal/plugins/mcp/stdio.go @@ -5,6 +5,7 @@ import ( "encoding/json" "fmt" "io" + "os" "os/exec" "sync" ) @@ -22,7 +23,7 @@ type StdioTransport struct { func NewStdioTransport(command string, args []string, env []string) (*StdioTransport, error) { cmd := exec.Command(command, args...) if len(env) > 0 { - cmd.Env = env + cmd.Env = append(os.Environ(), env...) } stdin, err := cmd.StdinPipe()