fix(client/v2): correctly handle enhanced sub commands (backport #21809) (#21929)

Co-authored-by: John Letey <john@noble.xyz>
This commit is contained in:
mergify[bot] 2024-09-26 15:24:00 +02:00 committed by GitHub
parent 596a65c80f
commit 174ca005f1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View File

@ -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 == "" {

View File

@ -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