Hand checked processing selections to execution

This commit is contained in:
2026-11-16 14:18:38 +00:00
parent b1d1b8302c
commit e98e525b5c
19 changed files with 268 additions and 102 deletions

View File

@@ -10,6 +10,7 @@ import (
"gitea.maximumdirect.net/eric/audita/v3/internal/core/reporting"
"gitea.maximumdirect.net/eric/audita/v3/internal/core/schema"
"gitea.maximumdirect.net/eric/audita/v3/internal/framework/llm"
"gitea.maximumdirect.net/eric/audita/v3/internal/framework/preflight"
"go.maximumdirect.net/ckconfig"
commandkit "go.maximumdirect.net/commandkit"
ck "go.maximumdirect.net/configkit"
@@ -36,6 +37,10 @@ func runProcess(inv commandkit.Invocation, input processInput) commandkit.Outcom
}
prepared, err := prepareProcess(inv.Context, input, loaded, inv.Reporter().Output())
if err != nil {
var selection *preflight.SelectionError
if inv.Context.Err() == nil && errors.As(err, &selection) {
return commandkit.Usage(err.Error()).WithCause(err)
}
return commandkit.Failure(err.Error()).WithCause(err)
}
defer prepared.Prepared.Output.Close()