mirror of https://github.com/sbt/sbt.git
When running commands like 'Test/definedTests' on multi-project builds, the output was showing raw Vector(...) format instead of nicely formatted per-item output. Before: [info] svc / Test / definedTests [info] Vector(Test FooSpec : ..., Test BarSpec : ..., ...) After: [info] svc / Test / definedTests [info] * Test FooSpec : ... [info] * Test BarSpec : ... The fix extends printSettings to check if values are Seq types in the multi-project case and format each item on its own line with a '* ' prefix, matching the single-project behavior.
This commit is contained in:
parent
1efebeaa98
commit
402619fc45
|
|
@ -55,7 +55,17 @@ object Aggregation {
|
|||
case KeyValue(_, x: Seq[?]) :: Nil => print(x.mkString("* ", "\n* ", ""))
|
||||
case KeyValue(_, x) :: Nil => print(x.toString)
|
||||
case _ =>
|
||||
xs foreach (kv => print(display.show(kv.key) + "\n\t" + kv.value.toString))
|
||||
xs foreach { kv =>
|
||||
print(display.show(kv.key))
|
||||
kv.value match {
|
||||
case seq: Seq[?] if seq.nonEmpty =>
|
||||
seq.foreach(item => print("\t* " + item.toString))
|
||||
case seq: Seq[?] =>
|
||||
print("\t(empty)")
|
||||
case x =>
|
||||
print("\t" + x.toString)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
type Values[T] = Seq[KeyValue[T]]
|
||||
|
|
|
|||
Loading…
Reference in New Issue