From 1375fdb780e008b2b634bf7ce21cc12560ad200c Mon Sep 17 00:00:00 2001 From: Albert Nigmatzianov Date: Mon, 27 Feb 2017 14:19:59 +0500 Subject: [PATCH] Fix output of help if it's invalid command --- command.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/command.go b/command.go index 6621954c..87dfb7ba 100644 --- a/command.go +++ b/command.go @@ -698,7 +698,6 @@ func (c *Command) Execute() error { // ExecuteC executes the command. func (c *Command) ExecuteC() (cmd *Command, err error) { - // Regardless of what command execute is called on, run on Root only if c.HasParent() { return c.Root().ExecuteC() @@ -783,7 +782,7 @@ func (c *Command) initHelpCmd() { Run: func(c *Command, args []string) { cmd, _, e := c.Root().Find(args) if cmd == nil || e != nil { - c.Printf("Unknown help topic %#q.", args) + c.Printf("Unknown help topic %#q\n", args) c.Root().Usage() } else { cmd.Help()