From 8880c610675943d10f22227987163d9750d4cfa0 Mon Sep 17 00:00:00 2001 From: gastown/crew/gus Date: Sat, 17 Jan 2026 00:37:50 -0800 Subject: [PATCH] fix(convoy): capture stderr for 'couldn't track issue' warnings The bd dep add command was failing with only "exit status 1" shown because stderr wasn't being captured. Now shows actual error message. Fixes: gt-g8eqq5 Co-Authored-By: Claude Opus 4.5 --- internal/cmd/convoy.go | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/internal/cmd/convoy.go b/internal/cmd/convoy.go index 7a8fe8c7..3cc1b18f 100644 --- a/internal/cmd/convoy.go +++ b/internal/cmd/convoy.go @@ -344,9 +344,15 @@ func runConvoyCreate(cmd *cobra.Command, args []string) error { depArgs := []string{"dep", "add", convoyID, issueID, "--type=tracks"} depCmd := exec.Command("bd", depArgs...) depCmd.Dir = townBeads + var depStderr bytes.Buffer + depCmd.Stderr = &depStderr if err := depCmd.Run(); err != nil { - style.PrintWarning("couldn't track %s: %v", issueID, err) + errMsg := strings.TrimSpace(depStderr.String()) + if errMsg == "" { + errMsg = err.Error() + } + style.PrintWarning("couldn't track %s: %s", issueID, errMsg) } else { trackedCount++ } @@ -434,9 +440,15 @@ func runConvoyAdd(cmd *cobra.Command, args []string) error { depArgs := []string{"dep", "add", convoyID, issueID, "--type=tracks"} depCmd := exec.Command("bd", depArgs...) depCmd.Dir = townBeads + var depStderr bytes.Buffer + depCmd.Stderr = &depStderr if err := depCmd.Run(); err != nil { - style.PrintWarning("couldn't add %s: %v", issueID, err) + errMsg := strings.TrimSpace(depStderr.String()) + if errMsg == "" { + errMsg = err.Error() + } + style.PrintWarning("couldn't add %s: %s", issueID, errMsg) } else { addedCount++ }