Skip to content

Commit f2d262c

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

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
@@ -206,7 +206,12 @@ func (f *TextFormatter) writeModuleOutputTo(content Content, writer io.Writer) {
206206
// Print metadata before content
207207
f.writeMetadata(content, writer)
208208

209-
fmt.Fprint(writer, output)
209+
// If output doesn't end with a newline, add one to separate from next output
210+
if len(output) > 0 && output[len(output)-1] != '\n' {
211+
fmt.Fprintln(writer, output)
212+
} else {
213+
fmt.Fprint(writer, output)
214+
}
210215
} else {
211216
f.writeGeneralTo(content, writer)
212217
}

0 commit comments

Comments
 (0)