From c0680660d578b6cc2181b7eb7e7361eb8742097f Mon Sep 17 00:00:00 2001 From: Frank Schroeder Date: Wed, 24 May 2017 23:53:05 +0200 Subject: [PATCH] vendor: patch github.com/mitchellh/cli until help output is fixed We need to init the flagset that cli uses to generate the help outside of the Run method since Run isn't called anymore for printing help. --- vendor/github.com/mitchellh/cli/cli.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/vendor/github.com/mitchellh/cli/cli.go b/vendor/github.com/mitchellh/cli/cli.go index 4a69d176db..6051ad57a6 100644 --- a/vendor/github.com/mitchellh/cli/cli.go +++ b/vendor/github.com/mitchellh/cli/cli.go @@ -398,12 +398,6 @@ func (c *CLI) processArgs() { break } - // Check for help flags. - if arg == "-h" || arg == "-help" || arg == "--help" { - c.isHelp = true - continue - } - if c.subcommand == "" { // Check for version flags if not in a subcommand. if arg == "-v" || arg == "-version" || arg == "--version" { @@ -411,6 +405,12 @@ func (c *CLI) processArgs() { continue } + // Check for help flags. + if arg == "-h" || arg == "-help" || arg == "--help" { + c.isHelp = true + continue + } + if arg != "" && arg[0] == '-' { // Record the arg... c.topFlags = append(c.topFlags, arg)