Skip to content

Commit

Permalink
fix: parent command [cmdx] has duplicated subcommand name or alias: (
Browse files Browse the repository at this point in the history
  • Loading branch information
suzuki-shunsuke authored Jan 2, 2025
1 parent aec3b7d commit e55294d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/handler/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,13 @@ func convertTaskToCommand(task domain.Task, gFlags *domain.GlobalFlags) *cli.Com
for i, s := range task.Tasks {
tasks[i] = convertTaskToCommand(s, gFlags)
}
aliases := []string{}
if task.Short != "" {
aliases = []string{task.Short}
}
return &cli.Command{
Name: task.Name,
Aliases: []string{task.Short},
Aliases: aliases,
Usage: task.Usage,
Description: task.Description,
Subcommands: tasks,
Expand Down

0 comments on commit e55294d

Please sign in to comment.