Report configured bootstrap evidence at invocation completion

This commit is contained in:
2026-11-23 14:25:50 +00:00
parent 6175945230
commit 457b5a3976
8 changed files with 161 additions and 62 deletions

View File

@@ -44,13 +44,5 @@ func consoleFields(fields []any) commandkit.Detail {
func withCommandReporting(deps commandDependencies, invocation commandkit.Invocation) commandDependencies {
deps.reporter = nativeConsole{reporter: invocation.Reporter()}
deps.diagnostics = bootstrapInfoWriter{reporter: invocation.Reporter()}
return deps
}
type bootstrapInfoWriter struct{ reporter *commandkit.Reporter }
func (w bootstrapInfoWriter) Write(body []byte) (int, error) {
_ = w.reporter.Info("", func(destination io.Writer) error { _, err := destination.Write(body); return err })
return len(body), nil
}