Skip to content

Commit

Permalink
Fix command handling if not required
Browse files Browse the repository at this point in the history
  • Loading branch information
pteich committed Jul 21, 2022
1 parent 75f2243 commit 59b68ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion configstruct.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func ParseWithFlagSet(flagSet *flag.FlagSet, cliArgs []string, c interface{}, op
return fmt.Errorf("argument %s is required", name)
}

if required {
if argVal != "" {
value.Set(reflect.ValueOf(argVal))
}
}
Expand Down

0 comments on commit 59b68ac

Please sign in to comment.