From 2f0f0763cc6e0462528280681b76f6ad5c583b82 Mon Sep 17 00:00:00 2001 From: mayor Date: Sat, 24 Jan 2026 22:23:52 -0800 Subject: [PATCH] fix(build): use GT_ROOT for build error path hint Co-Authored-By: Claude Opus 4.5 --- internal/cmd/root.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/cmd/root.go b/internal/cmd/root.go index b3de8c6f..26cefafb 100644 --- a/internal/cmd/root.go +++ b/internal/cmd/root.go @@ -73,7 +73,9 @@ func persistentPreRun(cmd *cobra.Command, args []string) error { if BuiltProperly == "" { fmt.Fprintln(os.Stderr, "ERROR: This binary was built with 'go build' directly.") fmt.Fprintln(os.Stderr, " Use 'make build' to create a properly signed binary.") - fmt.Fprintln(os.Stderr, " Run from: ~/gt/gastown/mayor/rig (or your rig's worktree)") + if gtRoot := os.Getenv("GT_ROOT"); gtRoot != "" { + fmt.Fprintf(os.Stderr, " Run from: %s\n", gtRoot) + } os.Exit(1) }