Skip to content

Commit 75e5684

Browse files
committed
fix: print run summary outside logrus so newlines render
printSummary sent the ASCII-art banner + nuked-resource list as a single logrus.Info call; TextFormatter quotes the msg field and escapes every newline to a literal \n, mangling the report. Write the summary straight to logger.Out instead (still honours SetOutput), bypassing the formatter.
1 parent 9a712dc commit 75e5684

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

pkg/commands/run/summary.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,12 @@ func printSummary(logger *logrus.Logger, entries []nukedEntry) {
8888
fmt.Fprintf(&b, " - %s\n", label(e))
8989
}
9090

91-
logger.Info(b.String())
91+
// The summary is final human-facing report output (ASCII art + a
92+
// multi-line list), not a structured log record. Routing it through
93+
// logrus makes the TextFormatter quote the msg field and escape every
94+
// newline to a literal \n. Write straight to the logger's output so the
95+
// banner renders with real line breaks while still honouring SetOutput.
96+
fmt.Fprint(logger.Out, b.String())
9297
}
9398

9499
func label(e nukedEntry) string {

0 commit comments

Comments
 (0)