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
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user