Finish native completion and retire legacy command machinery
This commit is contained in:
@@ -44,5 +44,13 @@ 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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user