Skip to content

Commit

Permalink
Fix test failures
Browse files Browse the repository at this point in the history
  • Loading branch information
dearchap authored and Naveen Gogineni committed Mar 23, 2021
1 parent 1abf95b commit 239e218
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion flag_bool.go
Expand Up @@ -46,6 +46,7 @@ func (b *boolValue) Set(s string) error {
v, err := strconv.ParseBool(s)
if err != nil {
err = errors.New("parse error")
return err
}
*b.destination = v
*b.count = *b.count + 1
Expand Down Expand Up @@ -120,7 +121,8 @@ func (f *BoolFlag) Apply(set *flag.FlagSet) error {
if f.Destination != nil {
value = newBoolValue(f.Value, f.Destination, &f.Count)
} else {
value = newBoolValue(f.Value, &f.Value, &f.Count)
t := new(bool)
value = newBoolValue(f.Value, t, &f.Count)
}
set.Var(value, name, f.Usage)
}
Expand Down

0 comments on commit 239e218

Please sign in to comment.