Skip to content

Commit

Permalink
Print message only if non empty, avoid extra newlines
Browse files Browse the repository at this point in the history
  • Loading branch information
lolgab committed Jan 28, 2024
1 parent 0da3f05 commit 3e6aea0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion testrunner/src/mill/testrunner/TestRunnerUtils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,12 @@ import scala.jdk.CollectionConverters.IteratorHasAsScala
runner.done()
}

ctx.log.outputStream.println(doneMessage)
if(doneMessage.nonEmpty) {
if (doneMessage.endsWith("\n"))
ctx.log.outputStream.print(doneMessage)
else
ctx.log.outputStream.println(doneMessage)
}

val results = for (e <- events.iterator().asScala) yield {
val ex =
Expand Down

0 comments on commit 3e6aea0

Please sign in to comment.