Skip to content

Commit

Permalink
fix(client/v2): correctly handle enhanced sub commands (#21809)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnletey committed Sep 26, 2024
1 parent c9d3a0b commit 13f1d6c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion client/v2/autocli/msg.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ func (b *Builder) AddMsgServiceCommands(cmd *cobra.Command, cmdDescriptor *autoc
return err
}

cmd.AddCommand(subCmd)
if !subCmdDescriptor.EnhanceCustomCommand {
cmd.AddCommand(subCmd)
}
}

if cmdDescriptor.Service == "" {
Expand Down
4 changes: 3 additions & 1 deletion client/v2/autocli/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ func (b *Builder) AddQueryServiceCommands(cmd *cobra.Command, cmdDescriptor *aut
return err
}

cmd.AddCommand(subCmd)
if !subCmdDesc.EnhanceCustomCommand {
cmd.AddCommand(subCmd)
}
}

// skip empty command descriptors
Expand Down

0 comments on commit 13f1d6c

Please sign in to comment.