From 05911d5503434a802c6dc9909a74cc76c2bf6661 Mon Sep 17 00:00:00 2001 From: Joseph Richey Date: Fri, 29 Sep 2017 02:08:56 -0700 Subject: vendor: Update to latest versions This changes the vendored sources of github.com/golang/protobuf, golang.org/x/crypto/ssh, and golang.org/x/sys/unix to be the current master versions. --- vendor/github.com/urfave/cli/command.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'vendor/github.com/urfave/cli/command.go') diff --git a/vendor/github.com/urfave/cli/command.go b/vendor/github.com/urfave/cli/command.go index 84946e7..23de294 100644 --- a/vendor/github.com/urfave/cli/command.go +++ b/vendor/github.com/urfave/cli/command.go @@ -59,6 +59,11 @@ type Command struct { // Full name of command for help, defaults to full command name, including parent commands. HelpName string commandNamePath []string + + // CustomHelpTemplate the text template for the command help topic. + // cli.go uses text/template to render templates. You can + // render custom help text by setting this variable. + CustomHelpTemplate string } type CommandsByName []Command @@ -192,8 +197,6 @@ func (c Command) Run(ctx *Context) (err error) { if c.Before != nil { err = c.Before(context) if err != nil { - fmt.Fprintln(context.App.Writer, err) - fmt.Fprintln(context.App.Writer) ShowCommandHelp(context, c.Name) HandleExitCoder(err) return err @@ -250,6 +253,7 @@ func (c Command) startApp(ctx *Context) error { // set CommandNotFound app.CommandNotFound = ctx.App.CommandNotFound + app.CustomAppHelpTemplate = c.CustomHelpTemplate // set the flags and commands app.Commands = c.Subcommands -- cgit v1.2.3