Run processing from the prepared invocation

This commit is contained in:
2026-11-27 01:17:45 +00:00
parent 2dc057b97e
commit b4bc5e5640
12 changed files with 133 additions and 66 deletions

View File

@@ -5,7 +5,6 @@ import (
"errors"
"gitea.maximumdirect.net/eric/audita/v4/internal/core/diagnostics"
"gitea.maximumdirect.net/eric/audita/v4/internal/framework/preflight"
)
type debugInput struct {
@@ -16,17 +15,12 @@ type debugInput struct {
}
type preparedOutput struct {
Plan *preflight.Plan
Output *diagnostics.OutputSession
Debug *diagnostics.RunDirectory
Warnings []error
}
func prepareOutput(ctx context.Context, plan *preflight.Plan, selection diagnostics.OutputSelection, initial diagnostics.ReportBundle, failed diagnostics.ReportRenderer, debug *debugInput) (*preparedOutput, error) {
checked, err := diagnostics.CheckOutput(selection)
if err != nil {
return nil, err
}
func prepareOutput(ctx context.Context, checked *diagnostics.CheckedDestinations, initial diagnostics.ReportBundle, failed diagnostics.ReportRenderer, debug *debugInput) (*preparedOutput, error) {
if err := ctx.Err(); err != nil {
return nil, err
}
@@ -44,7 +38,7 @@ func prepareOutput(ctx context.Context, plan *preflight.Plan, selection diagnost
if err := ctx.Err(); err != nil {
return nil, cancelOutput(err)
}
result := &preparedOutput{Plan: plan, Output: session}
result := &preparedOutput{Output: session}
if debug != nil {
result.Debug, result.Warnings = diagnostics.PrepareDebug(debug.WorkDir, debug.RunID, debug.Metadata, debug.EffectiveConfig)
}