Skip to content

Commit

Permalink
cmd/utils: fix bug when checking for flag value conflicts (ethereum#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
gzliudan committed Dec 19, 2024
1 parent 4f8443b commit 6d732cc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/utils/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -1318,11 +1318,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.String(flag.Names()[0]) == option {
name += "=" + option
set = append(set, "--"+name)
}
// shift arguments and continue
i++
continue

case cli.Flag:
default:
Expand Down

0 comments on commit 6d732cc

Please sign in to comment.