Preserve diagnostic aggregation failures during finalization
This commit is contained in:
@@ -82,9 +82,12 @@ func finalizeDiagnostics(output *runState) error {
|
||||
aggregator := frameworkdiagnostics.Aggregator{}
|
||||
for _, group := range output.diagnosticGroups {
|
||||
if err := aggregator.Add(group); err != nil {
|
||||
output.Diagnostics = aggregator.Collection()
|
||||
output.diagnosticGroups = nil
|
||||
return err
|
||||
}
|
||||
}
|
||||
output.Diagnostics = aggregator.Collection()
|
||||
output.diagnosticGroups = nil
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user