fix nested conditions

main
Sergey Goroshko 4 years ago
parent 196b222a8b
commit 10fe017765

@ -117,11 +117,10 @@ func (f *StringSliceFlag) GetValue() string {
// Apply populates the flag given the flag set and environment
func (f *StringSliceFlag) Apply(set *flag.FlagSet) error {
if f.Destination != nil {
if f.Value != nil {
f.Destination.slice = make([]string, len(f.Value.slice))
copy(f.Destination.slice, f.Value.slice)
}
if f.Destination != nil && f.Value != nil {
f.Destination.slice = make([]string, len(f.Value.slice))
copy(f.Destination.slice, f.Value.slice)
}
if val, ok := flagFromEnvOrFile(f.EnvVars, f.FilePath); ok {

Loading…
Cancel
Save