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++ }