Skip to content

Commit 412f4e7

Browse files
mergify[bot]johnleteyjulienrbrt
authored
fix(client/v2): correctly handle enhanced sub commands (backport #21809) (#21930)
Co-authored-by: John Letey <[email protected]> Co-authored-by: Julien Robert <[email protected]>
1 parent bcd31a1 commit 412f4e7

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

client/v2/CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ Ref: https://keepachangelog.com/en/1.0.0/
3636

3737
## [Unreleased]
3838

39+
### Bug Fixes
40+
41+
* [#21809](https://github.com/cosmos/cosmos-sdk/pull/21809) Correctly handle enhanced sub commands.
42+
3943
## [v2.0.0-beta.5] - 2024-09-18
4044

4145
### Improvements

client/v2/autocli/msg.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ func (b *Builder) AddMsgServiceCommands(cmd *cobra.Command, cmdDescriptor *autoc
4949
return err
5050
}
5151

52-
cmd.AddCommand(subCmd)
52+
if !subCmdDescriptor.EnhanceCustomCommand {
53+
cmd.AddCommand(subCmd)
54+
}
5355
}
5456

5557
if cmdDescriptor.Service == "" {

client/v2/autocli/query.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ func (b *Builder) AddQueryServiceCommands(cmd *cobra.Command, cmdDescriptor *aut
5252
return err
5353
}
5454

55-
cmd.AddCommand(subCmd)
55+
if !subCmdDesc.EnhanceCustomCommand {
56+
cmd.AddCommand(subCmd)
57+
}
5658
}
5759

5860
// skip empty command descriptors

0 commit comments

Comments
 (0)