Retain validation report delivery errors in outcomes
This commit is contained in:
@@ -68,11 +68,15 @@ func runConfigValidation[C any](invocation Invocation, suite ConfigSuite[C], inp
|
||||
}
|
||||
if input.Format == "yaml" && !writtenRecord {
|
||||
if err := writeReport(invocation.Streams.Out, []byte("scopes:\n")); err != nil {
|
||||
return validationFailure(err, diagnostics, true)
|
||||
outcome := validationFailure(err, diagnostics, true)
|
||||
outcome.DeliveryError = err
|
||||
return outcome
|
||||
}
|
||||
}
|
||||
if err := writeReport(invocation.Streams.Out, record); err != nil {
|
||||
return validationFailure(err, diagnostics, true)
|
||||
outcome := validationFailure(err, diagnostics, true)
|
||||
outcome.DeliveryError = err
|
||||
return outcome
|
||||
}
|
||||
writtenRecord = true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user