Write framework explanations in one pass
This commit is contained in:
@@ -100,6 +100,10 @@ restriction, or change to composition is needed.
|
||||
|
||||
## R5: Replay framework explanation history once (Stage 3)
|
||||
|
||||
**Complete.** Framework inspection calls the native explanation writer
|
||||
once. The framework inspection tests passed, including path errors,
|
||||
redaction, and writer failures.
|
||||
|
||||
[Framework configuration inspection](../../internal/adapter/cli/framework_config.go)
|
||||
calls `view.Explain(path)` to check existence, discards the complete
|
||||
explanation, then calls `view.WriteExplanation`. The pinned native writer
|
||||
|
||||
@@ -75,12 +75,8 @@ func inspectFrameworkConfigurationCommand(args []string, stdout, stderr io.Write
|
||||
}
|
||||
|
||||
if cfg.mode == "explain" {
|
||||
if _, ok := view.Explain(explanationPath); !ok {
|
||||
writeApplicationError(stderr, "inspect configuration path", fmt.Errorf("unknown path %q", cfg.path))
|
||||
return ExitRuntimeError
|
||||
}
|
||||
if err := view.WriteExplanation(stdout, explanationPath); err != nil {
|
||||
fmt.Fprintf(stderr, "inspect configuration output error: %v\n", err)
|
||||
fmt.Fprintf(stderr, "inspect configuration explain %q: %v\n", cfg.path, err)
|
||||
return ExitRuntimeError
|
||||
}
|
||||
return ExitOK
|
||||
|
||||
Reference in New Issue
Block a user