Skip to content

Commit

Permalink
Merge pull request #1599 from rancher/fix-koanf-load-strict
Browse files Browse the repository at this point in the history
Fix koanf slice decoding
  • Loading branch information
dbason authored Jul 28, 2023
2 parents 216b2a9 + fba9cee commit 2285b4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dagger/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ func mergeStrict(src, dest map[string]any) error {
// a type mismatch when merging with a slice of a specific type.
if reflect.TypeOf(dest[key]).Kind() == reflect.Slice &&
reflect.TypeOf(val) == reflect.TypeOf(([]any)(nil)) &&
reflect.ValueOf(val).Len() == 0 {
reflect.ValueOf(dest[key]).Len() == 0 {
dest[key] = reflect.MakeSlice(reflect.TypeOf(dest[key]), 0, 0).Interface()
continue
}
Expand Down

0 comments on commit 2285b4d

Please sign in to comment.