Skip to content

Commit

Permalink
Merge pull request #829 from rsteube/traverse-fix-flagseries
Browse files Browse the repository at this point in the history
traverse: fix shorthand flagseries check
  • Loading branch information
rsteube committed Jul 17, 2023
2 parents e2bc7ce + 1c59156 commit 1d7547f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion traverse.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ loop:
if inFlag != nil && len(inFlag.Args) == 0 && inFlag.Consumes("") {
LOG.Printf("removing arg %#v since it is a flag missing its argument\n", toParse[len(toParse)-1])
toParse = toParse[:len(toParse)-1]
} else if fs.IsShorthandSeries(context.Value) {
} else if (fs.IsInterspersed() || len(inPositionals) == 0) && fs.IsShorthandSeries(context.Value) {
LOG.Printf("arg %#v is a shorthand flag series", context.Value)
localInFlag := &_inFlag{
Flag: fs.LookupArg(context.Value),
Expand Down

0 comments on commit 1d7547f

Please sign in to comment.