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)