From bcf9994195f96ab344dc210bd7f92c8f32593e14 Mon Sep 17 00:00:00 2001 From: Steve Yegge Date: Sun, 28 Dec 2025 16:36:09 -0800 Subject: [PATCH] fix: Require Gas Town workspace for gt feed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fail fast with clear error when run outside ~/gt instead of hanging while bd tries to start. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- internal/cmd/feed.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/internal/cmd/feed.go b/internal/cmd/feed.go index 5d0fe799..74857d14 100644 --- a/internal/cmd/feed.go +++ b/internal/cmd/feed.go @@ -75,6 +75,12 @@ Examples: } func runFeed(cmd *cobra.Command, args []string) error { + // Must be in a Gas Town workspace + townRoot, err := workspace.FindFromCwdOrError() + if err != nil { + return fmt.Errorf("not in a Gas Town workspace (run from ~/gt or a rig directory)") + } + // Determine working directory workDir, err := os.Getwd() if err != nil { @@ -83,11 +89,6 @@ func runFeed(cmd *cobra.Command, args []string) error { // If --rig specified, find that rig's beads directory if feedRig != "" { - townRoot, err := workspace.FindFromCwdOrError() - if err != nil { - return fmt.Errorf("not in a Gas Town workspace: %w", err) - } - // Try common beads locations for the rig candidates := []string{ fmt.Sprintf("%s/%s/mayor/rig", townRoot, feedRig),