From a5ecc659d9509bef3c934ef82f74355b066f6def Mon Sep 17 00:00:00 2001 From: Steve Yegge Date: Fri, 26 Dec 2025 19:20:47 -0800 Subject: [PATCH] fix: Remove hardcoded gastown fallback from log.go (gt-h8k9d) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The crash logging fallback assumed users might have their town at ~/gastown, which only works if the gastown rig is installed. Now only tries ~/gt as the conventional town root. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- internal/cmd/log.go | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/internal/cmd/log.go b/internal/cmd/log.go index 3d3ba243..a215b23f 100644 --- a/internal/cmd/log.go +++ b/internal/cmd/log.go @@ -264,21 +264,15 @@ func truncateStr(s string, maxLen int) string { func runLogCrash(cmd *cobra.Command, args []string) error { townRoot, err := workspace.FindFromCwd() if err != nil || townRoot == "" { - // Try to find town root from common locations + // Try to find town root from conventional location // This is called from tmux hook which may not have proper cwd home := os.Getenv("HOME") - possibleRoots := []string{ - home + "/gt", - home + "/gastown", - } - for _, root := range possibleRoots { - if _, statErr := os.Stat(root + "/mayor"); statErr == nil { - townRoot = root - break - } + defaultRoot := home + "/gt" + if _, statErr := os.Stat(defaultRoot + "/mayor"); statErr == nil { + townRoot = defaultRoot } if townRoot == "" { - return fmt.Errorf("cannot find town root") + return fmt.Errorf("cannot find town root (tried cwd and ~/gt)") } }