[Commonizer] Logging: Show [Step x of y] only when more than one task is scheduled

^KT-36679
This commit is contained in:
sebastian.sellmair
2021-04-29 09:31:30 +02:00
committed by TeamCityServer
parent 9eaec8d919
commit 0d9e32f963
@@ -30,10 +30,11 @@ fun main(args: Array<String>) {
category.prologue?.let(::println)
sortedTasks.forEachIndexed { index, task ->
val logPrefix = if (category.logEachStep) "[Step ${index + 1} of ${sortedTasks.size}] " else ""
val logPrefix = if (category.logEachStep && sortedTasks.size > 1) "[Step ${index + 1} of ${sortedTasks.size}] " else ""
task.execute(logPrefix)
}
category.epilogue?.let(::println)
}
}