From a530912a674605fca679e5b71f35f2018b34a737 Mon Sep 17 00:00:00 2001 From: John Letey Date: Thu, 26 Sep 2024 15:04:20 +0200 Subject: [PATCH 1/2] fix(client/v2): correctly handle enhanced sub commands (#21809) (cherry picked from commit 13f1d6cf665f26cfe31bc747b5d79111ab8a2c86) --- client/v2/autocli/msg.go | 4 +++- client/v2/autocli/query.go | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/client/v2/autocli/msg.go b/client/v2/autocli/msg.go index 5459c245a228..322fa6b26228 100644 --- a/client/v2/autocli/msg.go +++ b/client/v2/autocli/msg.go @@ -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 == "" { diff --git a/client/v2/autocli/query.go b/client/v2/autocli/query.go index 7e0f4cbc3185..dcb41bbfa25a 100644 --- a/client/v2/autocli/query.go +++ b/client/v2/autocli/query.go @@ -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 From 24da0dc64c5a8bc19e9d19e2a889dd8563333e9a Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Thu, 26 Sep 2024 15:27:45 +0200 Subject: [PATCH 2/2] ad cl --- client/v2/CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/v2/CHANGELOG.md b/client/v2/CHANGELOG.md index 36a91eff82e2..426244bc14ce 100644 --- a/client/v2/CHANGELOG.md +++ b/client/v2/CHANGELOG.md @@ -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