Skip to content

Commit

Permalink
fix(help command): restore help command non-html message
Browse files Browse the repository at this point in the history
  • Loading branch information
mj committed Jun 23, 2024
1 parent a80b12f commit 39e1f3d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 52 deletions.
10 changes: 2 additions & 8 deletions internal/engine/command/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ import (
"fmt"
"slices"

"github.com/pagu-project/Pagu/config"
"github.com/pagu-project/Pagu/pkg/template"

"github.com/pagu-project/Pagu/internal/entity"
)

Expand Down Expand Up @@ -99,12 +96,9 @@ func (cmd *Command) HasSubCommand() bool {
func (cmd *Command) HelpMessage() string {
help := cmd.Help
help += "\n\nAvailable commands:\n"
message, err := template.ExecuteHtml(config.HelpCommandTemplate, cmd.SubCommands)
if err != nil {
return ""
for _, sc := range cmd.SubCommands {
help += fmt.Sprintf(" %-12s %s\n", sc.Name, sc.Desc)
}

help += message
return help
}

Expand Down
44 changes: 0 additions & 44 deletions internal/engine/command/command_test.go

This file was deleted.

0 comments on commit 39e1f3d

Please sign in to comment.