prevent flag grouping with --
Docker-DCO-1.1-Signed-off-by: Victor Vieux <victor.vieux@docker.com> (github: vieux)
This commit is contained in:
parent
6e7ffe094b
commit
d1b77040a7
1 changed files with 3 additions and 0 deletions
|
@ -772,6 +772,9 @@ func (f *FlagSet) parseOne() (bool, string, error) {
|
||||||
f.usage()
|
f.usage()
|
||||||
return false, "", ErrHelp
|
return false, "", ErrHelp
|
||||||
}
|
}
|
||||||
|
if len(name) > 0 && name[0] == '-' {
|
||||||
|
return false, "", f.failf("flag provided but not defined: -%s", name)
|
||||||
|
}
|
||||||
return false, name, ErrRetry
|
return false, name, ErrRetry
|
||||||
}
|
}
|
||||||
if fv, ok := flag.Value.(boolFlag); ok && fv.IsBoolFlag() { // special case: doesn't need an arg
|
if fv, ok := flag.Value.(boolFlag); ok && fv.IsBoolFlag() { // special case: doesn't need an arg
|
||||||
|
|
Loading…
Reference in a new issue