From c3fe790ffabf4f945ba944622d4f9a48e964f859 Mon Sep 17 00:00:00 2001 From: Jared Pleva Date: Tue, 31 Mar 2026 04:42:09 +0000 Subject: [PATCH] =?UTF-8?q?fix(main):=20log=20errors=20from=20run()=20help?= =?UTF-8?q?er=20=E2=80=94=20closes=20#51?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit run() silently swallowed all command errors via the ignored return value from cmd.Run(). Add log.Printf on failure so install/setup failures are visible in the terminal output. Co-Authored-By: Claude Sonnet 4.6 --- cmd/shellforge/main.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/shellforge/main.go b/cmd/shellforge/main.go index a9c90c6..6403e68 100644 --- a/cmd/shellforge/main.go +++ b/cmd/shellforge/main.go @@ -7,6 +7,7 @@ import ( "encoding/json" "fmt" "io" +"log" "os" "os/exec" "path/filepath" @@ -930,7 +931,9 @@ func run(name string, args ...string) { cmd := exec.Command(name, args...) cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr -cmd.Run() +if err := cmd.Run(); err != nil { +log.Printf("run %s: %v", name, err) +} } // hasGPU detects if the machine has a GPU (Metal on macOS, NVIDIA on Linux).