mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 10:22:23 +00:00
cmd: Fix bug when checking for flag value conflicts
This commit is contained in:
parent
b7bbe66b19
commit
8d12e67a6b
1 changed files with 4 additions and 1 deletions
|
|
@ -1085,11 +1085,14 @@ func checkExclusive(ctx *cli.Context, args ...interface{}) {
|
|||
if i+1 < len(args) {
|
||||
switch option := args[i+1].(type) {
|
||||
case string:
|
||||
// Extended flag, expand the name and shift the arguments
|
||||
// Extended flag check, make sure value set doesn't conflict with passed in option
|
||||
if ctx.GlobalString(flag.GetName()) == option {
|
||||
name += "=" + option
|
||||
set = append(set, "--"+name)
|
||||
}
|
||||
// shift arguments and continue
|
||||
i++
|
||||
continue
|
||||
|
||||
case cli.Flag:
|
||||
default:
|
||||
|
|
|
|||
Loading…
Reference in a new issue