Skip to content

Commit

Permalink
Only store manyData once
Browse files Browse the repository at this point in the history
Only collect the policy data once for each source
group. Before this the data was duplicated for
each component.

https://issues.redhat.com/browse/EC-1027
  • Loading branch information
joejstuart committed Nov 25, 2024
1 parent e614d88 commit f4bd4e0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/validate/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,9 @@ func validateImageCmd(validate imageValidationFunc) *cobra.Command {
allErrors = errors.Join(allErrors, e)
} else {
components = append(components, r.component)
manyData = append(manyData, r.data)
if len(manyData) == 0 {
manyData = append(manyData, r.data)
}
manyPolicyInput = append(manyPolicyInput, r.policyInput)
}
}
Expand Down

0 comments on commit f4bd4e0

Please sign in to comment.