Skip to content

Commit

Permalink
fix: fix failed status for help command (#284)
Browse files Browse the repository at this point in the history
  • Loading branch information
b00f authored Jan 20, 2025
1 parent fe2de71 commit 7c53c69
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions internal/engine/command/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ func (cmd *Command) RenderHelpTemplate() CommandResult {
**Usage:**
{{.cmd.Name}} [subcommand]
**Available subcommands:**
**Available Subcommands:**
{{- range .cmd.SubCommands }}
”{{.Name | fixed 15 }}” {{.Emoji}} {{.Help}}
{{- end}}
Expand All @@ -241,7 +241,7 @@ Use "{{.cmd.Name}} help --subcommand=[subcommand]" for more information about a
return CommandResult{
Title: fmt.Sprintf("%v %v", cmd.Name, cmd.Emoji),
Message: msg,
Successful: false,
Successful: true,
}
}

Expand All @@ -267,6 +267,7 @@ func (cmd *Command) AddSubCommand(subCmd *Command) {

func (cmd *Command) AddHelpSubCommand() {
helpCmd := &Command{
Emoji: "❓",
Name: "help",
Help: fmt.Sprintf("Help for %v command", cmd.Name),
AppIDs: entity.AllAppIDs(),
Expand All @@ -288,6 +289,7 @@ Version : {{.version}}

cmd.ResultTemplate = aboutTemplate
aboutCmd := &Command{
Emoji: "🛈",
Name: "about",
Help: "About Pagu",
AppIDs: entity.AllAppIDs(),
Expand Down
2 changes: 1 addition & 1 deletion internal/engine/command/market/market.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7c53c69

Please sign in to comment.