mirror of https://github.com/status-im/op-geth.git
cmd/utils: fix bug when checking for flag value conflicts (#17803)
This commit is contained in:
parent
c5d34fc94e
commit
cfcc47529d
|
@ -1085,11 +1085,14 @@ func checkExclusive(ctx *cli.Context, args ...interface{}) {
|
||||||
if i+1 < len(args) {
|
if i+1 < len(args) {
|
||||||
switch option := args[i+1].(type) {
|
switch option := args[i+1].(type) {
|
||||||
case string:
|
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 {
|
if ctx.GlobalString(flag.GetName()) == option {
|
||||||
name += "=" + option
|
name += "=" + option
|
||||||
|
set = append(set, "--"+name)
|
||||||
}
|
}
|
||||||
|
// shift arguments and continue
|
||||||
i++
|
i++
|
||||||
|
continue
|
||||||
|
|
||||||
case cli.Flag:
|
case cli.Flag:
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue