Check for parsing errors within parse.go:parseIter

Add description to that function's docstring, and delete extraneous space
This commit is contained in:
Roberto Hidalgo
2019-11-27 11:42:48 -05:00
parent 90a62d7b0c
commit f3295e3cdb
3 changed files with 12 additions and 8 deletions

View File

@@ -184,9 +184,8 @@ func (c *Command) parseFlags(args Args, shellComplete bool) (*flag.FlagSet, erro
return set, set.Parse(append([]string{"--"}, args.Tail()...))
}
err = parseIter(set, c, args.Tail())
// Continue parsing flags on failure during shell completion
if err != nil && !shellComplete {
err = parseIter(set, c, args.Tail(), shellComplete)
if err != nil {
return nil, err
}