Skip to content

Commit f0090e4

Browse files
jdxclaude
andcommitted
fix(hook): preserve configured output_summary label on failure
PR #772 forced Combined output on failure to avoid losing diagnostics, but this changed the summary header label (e.g., "lint output:" instead of "lint stderr:"), breaking #784's tests. Use combined content on failure but keep the configured label. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
1 parent 5f8cfaa commit f0090e4

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

src/step/output.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,14 @@ impl Step {
4646
return;
4747
}
4848

49-
// On failure, show combined output so diagnostic messages are never
50-
// lost regardless of which stream the tool writes to — unless the
51-
// step explicitly opted out with `output_summary = "hide"`.
49+
// On failure, use combined output so diagnostic messages are never
50+
// lost regardless of which stream the tool writes to — but keep
51+
// the configured label so tests/users see the expected header.
52+
// If the step explicitly opted out with `output_summary = "hide"`,
53+
// respect that even on failure.
5254
if is_failure && self.output_summary != OutputSummary::Hide {
5355
ctx.hook_ctx
54-
.append_step_output(&self.name, OutputSummary::Combined, combined)
56+
.append_step_output(&self.name, self.output_summary.clone(), combined)
5557
} else {
5658
match self.output_summary {
5759
OutputSummary::Stderr => {

0 commit comments

Comments
 (0)