From 92acfb7ed4cda8e93909eadb54863012eac45128 Mon Sep 17 00:00:00 2001 From: Grail Finder Date: Sat, 14 Mar 2026 11:06:18 +0300 Subject: Feat: run sed --- tools/chain.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tools/chain.go') diff --git a/tools/chain.go b/tools/chain.go index fb7767e..73ab6cd 100644 --- a/tools/chain.go +++ b/tools/chain.go @@ -266,6 +266,18 @@ func execBuiltin(name string, args []string, stdin string) string { } fsRootDir = abs return fmt.Sprintf("Changed directory to: %s", fsRootDir) + case "go": + // Allow all go subcommands + if len(args) == 0 { + return "[error] usage: go [options]" + } + cmd := exec.Command("go", args...) + cmd.Dir = fsRootDir + output, err := cmd.CombinedOutput() + if err != nil { + return fmt.Sprintf("[error] go %s: %v\n%s", args[0], err, string(output)) + } + return string(output) } return "" } -- cgit v1.2.3