Skip to content

Commit d769797

Browse files
committed
fix: fix failed status for help command
1 parent fe2de71 commit d769797

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

internal/engine/command/command.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ func (cmd *Command) RenderHelpTemplate() CommandResult {
229229
**Usage:**
230230
{{.cmd.Name}} [subcommand]
231231
232-
**Available subcommands:**
232+
**Available Subcommands:**
233233
{{- range .cmd.SubCommands }}
234234
”{{.Name | fixed 15 }}” {{.Emoji}} {{.Help}}
235235
{{- end}}
@@ -241,7 +241,7 @@ Use "{{.cmd.Name}} help --subcommand=[subcommand]" for more information about a
241241
return CommandResult{
242242
Title: fmt.Sprintf("%v %v", cmd.Name, cmd.Emoji),
243243
Message: msg,
244-
Successful: false,
244+
Successful: true,
245245
}
246246
}
247247

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

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

289290
cmd.ResultTemplate = aboutTemplate
290291
aboutCmd := &Command{
292+
Emoji: "🛈",
291293
Name: "about",
292294
Help: "About Pagu",
293295
AppIDs: entity.AllAppIDs(),

internal/engine/command/market/market.gen.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)