revert monkey patch for mitchellh/cli

This commit is contained in:
Frank Schroeder 2017-10-11 14:51:19 +02:00 committed by Frank Schröder
parent a49711b8bf
commit 366ec9a565
1 changed files with 6 additions and 6 deletions

View File

@ -578,6 +578,12 @@ func (c *CLI) processArgs() {
break break
} }
// Check for help flags.
if arg == "-h" || arg == "-help" || arg == "--help" {
c.isHelp = true
continue
}
// Check for autocomplete flags // Check for autocomplete flags
if c.Autocomplete { if c.Autocomplete {
if arg == "-"+c.AutocompleteInstall || arg == "--"+c.AutocompleteInstall { if arg == "-"+c.AutocompleteInstall || arg == "--"+c.AutocompleteInstall {
@ -598,12 +604,6 @@ func (c *CLI) processArgs() {
continue continue
} }
// Check for help flags.
if arg == "-h" || arg == "-help" || arg == "--help" {
c.isHelp = true
continue
}
if arg != "" && arg[0] == '-' { if arg != "" && arg[0] == '-' {
// Record the arg... // Record the arg...
c.topFlags = append(c.topFlags, arg) c.topFlags = append(c.topFlags, arg)