Skip to content

Commit

Permalink
internal/flags: fix flag redefined bug for cli v2 aliases (ethereum#3…
Browse files Browse the repository at this point in the history
  • Loading branch information
gzliudan authored and JukLee0ira committed Nov 25, 2024
1 parent 526ce00 commit 770a522
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/flags/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func (f *DirectoryFlag) String() string { return cli.FlagStringer(f) }
// and adds variable to flag set for parsing.
func (f *DirectoryFlag) Apply(set *flag.FlagSet) error {
eachName(f, func(name string) {
set.Var(&f.Value, f.Name, f.Usage)
set.Var(&f.Value, name, f.Usage)
})
return nil
}
Expand Down Expand Up @@ -166,7 +166,7 @@ func (f *TextMarshalerFlag) String() string { return cli.FlagStringer(f) }

func (f *TextMarshalerFlag) Apply(set *flag.FlagSet) error {
eachName(f, func(name string) {
set.Var(textMarshalerVal{f.Value}, f.Name, f.Usage)
set.Var(textMarshalerVal{f.Value}, name, f.Usage)
})
return nil
}
Expand Down Expand Up @@ -248,7 +248,7 @@ func (f *BigFlag) String() string { return cli.FlagStringer(f) }
func (f *BigFlag) Apply(set *flag.FlagSet) error {
eachName(f, func(name string) {
f.Value = new(big.Int)
set.Var((*bigValue)(f.Value), f.Name, f.Usage)
set.Var((*bigValue)(f.Value), name, f.Usage)
})

return nil
Expand Down

0 comments on commit 770a522

Please sign in to comment.