Skip to content

Commit

Permalink
Fix bug in values merging when ci directory exists
Browse files Browse the repository at this point in the history
Signed-off-by: Jose R. Gonzalez <[email protected]>
  • Loading branch information
komish committed Aug 14, 2024
1 parent caaae61 commit 0da261b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/chartverifier/checks/charttesting.go
Original file line number Diff line number Diff line change
Expand Up @@ -371,12 +371,13 @@ func newTempValuesFileWithOverrides(filename string, valuesOverrides map[string]

if filename != "" {
// in the case a filename is provided, read its contents and merge any available values override.
obj, err := readObjectFromYamlFile(filename)
var err error
obj, err = readObjectFromYamlFile(filename)
if err != nil {
return "", nil, fmt.Errorf("reading values file: %w", err)
}

err = mergo.MergeWithOverwrite(&obj, valuesOverrides)
err = mergo.Merge(&obj, valuesOverrides, mergo.WithOverride)
if err != nil {
return "", nil, fmt.Errorf("merging extra values: %w", err)
}
Expand Down

0 comments on commit 0da261b

Please sign in to comment.