-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Bug: Errors from exec.Command.Run() are silently dropped
File: cmd/shellforge/main.go
The run() helper used throughout cmdSetup() discards the error from cmd.Run():
func run(name string, args ...string) {
cmd := exec.Command(name, args...)
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
cmd.Run() // return value discarded
}Called for every setup step: brew install ollama, ollama pull $model, etc. If any of these fail (network down, brew not installed, disk full) the setup wizard silently continues and reports success.
Fix
func run(name string, args ...string) {
cmd := exec.Command(name, args...)
cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr
if err := cmd.Run(); err != nil {
fmt.Fprintf(os.Stderr, "[shellforge] command failed: %s %v: %v\n", name, args, err)
}
}Or propagate the error to callers and let cmdSetup() decide whether to abort or warn.
Reactions are currently unavailable