Skip to content
This repository was archived by the owner on Apr 19, 2026. It is now read-only.

Commit ce9f2bf

Browse files
jpleva91claude
andcommitted
fix: wizard auto-installs Go if missing before building Crush
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent fbbd0b6 commit ce9f2bf

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

cmd/shellforge/main.go

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919
"github.com/AgentGuardHQ/shellforge/internal/scheduler"
2020
)
2121

22-
var version = "0.4.6"
22+
var version = "0.4.7"
2323

2424
func main() {
2525
if len(os.Args) < 2 {
@@ -275,6 +275,19 @@ fmt.Println(" Crush — Go AI coding agent with AgentGuard governance (local mo
275275
fmt.Print(" Install Crush? [Y/n] ")
276276
if confirm(reader) {
277277
fmt.Println(" → Installing Crush (AgentGuardHQ fork with governance)...")
278+
// Ensure Go is installed (needed to build Crush)
279+
if _, err := exec.LookPath("go"); err != nil {
280+
fmt.Println(" → Go not found — installing...")
281+
if runtime.GOOS == "darwin" {
282+
run("brew", "install", "go")
283+
} else {
284+
run("sh", "-c", "curl -fsSL https://go.dev/dl/go1.23.0.linux-amd64.tar.gz | sudo tar -C /usr/local -xz && sudo ln -sf /usr/local/go/bin/go /usr/local/bin/go")
285+
}
286+
if _, err := exec.LookPath("go"); err != nil {
287+
fmt.Println(" ⚠ Go install failed. Install manually: brew install go")
288+
fmt.Println(" Then re-run: shellforge setup")
289+
}
290+
}
278291
// Clone, build, and install our governed fork
279292
crushDir := filepath.Join(os.TempDir(), "shellforge-crush-install")
280293
os.RemoveAll(crushDir)

0 commit comments

Comments
 (0)