fix(client/v2): correctly check subcommand short descriptions (#20330)
This commit is contained in:
parent
c4308d2da0
commit
431412bef2
@ -47,8 +47,8 @@ func (b *Builder) AddMsgServiceCommands(cmd *cobra.Command, cmdDescriptor *autoc
|
||||
for cmdName, subCmdDescriptor := range cmdDescriptor.SubCommands {
|
||||
subCmd := findSubCommand(cmd, cmdName)
|
||||
if subCmd == nil {
|
||||
short := cmdDescriptor.Short
|
||||
if cmdDescriptor.Short == "" {
|
||||
short := subCmdDescriptor.Short
|
||||
if short == "" {
|
||||
short = fmt.Sprintf("Tx commands for the %s service", subCmdDescriptor.Service)
|
||||
}
|
||||
subCmd = topLevelCmd(cmd.Context(), cmdName, short)
|
||||
|
||||
@ -41,7 +41,7 @@ func (b *Builder) AddQueryServiceCommands(cmd *cobra.Command, cmdDescriptor *aut
|
||||
for cmdName, subCmdDesc := range cmdDescriptor.SubCommands {
|
||||
subCmd := findSubCommand(cmd, cmdName)
|
||||
if subCmd == nil {
|
||||
short := cmdDescriptor.Short
|
||||
short := subCmdDesc.Short
|
||||
if short == "" {
|
||||
short = fmt.Sprintf("Querying commands for the %s service", subCmdDesc.Service)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user