Skip to content

Commit a70443c

Browse files
committed
fix: add newline to logs if not existing
Signed-off-by: llogen <christoph.lange@blindspot.software>
1 parent bb6ddf4 commit a70443c

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

internal/output/text.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,12 @@ func (f *TextFormatter) writeModuleOutputTo(content Content, writer io.Writer) {
278278
// Print metadata before content
279279
f.writeMetadata(content, writer)
280280

281-
fmt.Fprint(writer, output)
281+
// If output doesn't end with a newline, add one to separate from next output
282+
if len(output) > 0 && output[len(output)-1] != '\n' {
283+
fmt.Fprintln(writer, output)
284+
} else {
285+
fmt.Fprint(writer, output)
286+
}
282287
} else {
283288
f.writeGeneralTo(content, writer)
284289
}

0 commit comments

Comments
 (0)