From 7ad15fe52421a9535f6c86f9b65524e6bffefbcc Mon Sep 17 00:00:00 2001 From: Steve Yegge Date: Fri, 31 Oct 2025 18:15:13 -0700 Subject: [PATCH] Fix #188: Add --json flag to blocked command - Added --json flag registration for blockedCmd - Fixed blockedCmd to read json flag from cmd.Flags() - All commands now consistently support --json for agent use - Completes the fix started in earlier commits for show/update/close/stats --- cmd/bd/ready.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/bd/ready.go b/cmd/bd/ready.go index eabefb5c..a7b81368 100644 --- a/cmd/bd/ready.go +++ b/cmd/bd/ready.go @@ -153,6 +153,8 @@ var blockedCmd = &cobra.Command{ Use: "blocked", Short: "Show blocked issues", Run: func(cmd *cobra.Command, args []string) { + jsonOutput, _ := cmd.Flags().GetBool("json") + // If daemon is running but doesn't support this command, use direct storage if daemonClient != nil && store == nil { var err error @@ -299,6 +301,7 @@ func init() { readyCmd.Flags().Bool("json", false, "Output JSON format") statsCmd.Flags().Bool("json", false, "Output JSON format") + blockedCmd.Flags().Bool("json", false, "Output JSON format") rootCmd.AddCommand(readyCmd) rootCmd.AddCommand(blockedCmd)