Skip to content

Commit

Permalink
fix(client/v2): correctly handle enhanced sub commands (backport #21809
Browse files Browse the repository at this point in the history
…) (#21930)

Co-authored-by: John Letey <[email protected]>
Co-authored-by: Julien Robert <[email protected]>
  • Loading branch information
3 people authored Sep 26, 2024
1 parent bcd31a1 commit 412f4e7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions client/v2/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ Ref: https://keepachangelog.com/en/1.0.0/

## [Unreleased]

### Bug Fixes

* [#21809](https://github.com/cosmos/cosmos-sdk/pull/21809) Correctly handle enhanced sub commands.

## [v2.0.0-beta.5] - 2024-09-18

### Improvements
Expand Down
4 changes: 3 additions & 1 deletion client/v2/autocli/msg.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,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 @@ -52,7 +52,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 412f4e7

Please sign in to comment.