From bd1b3cfe00d7f6243d19ae53770b86fa03ed2d2f Mon Sep 17 00:00:00 2001 From: eugene yokota Date: Thu, 22 Sep 2016 21:12:44 -0400 Subject: [PATCH] Improve `show` when key returns a `Seq` (#2752) This changes the output to: ``` > show externalDependencyClasspath [info] Updating {file:/xxx/hello/}root... [info] Resolving jline#jline;2.12.1 ... [info] Done updating. [info] * Attributed(/Users/xxx/.sbt/boot/scala-2.11.8/lib/scala-library.jar) [info] * Attributed(/Users/xxx/.ivy2/cache/commons-io/commons-io/jars/commons-io- 2.4.jar) ``` --- main/src/main/scala/sbt/internal/Aggregation.scala | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main/src/main/scala/sbt/internal/Aggregation.scala b/main/src/main/scala/sbt/internal/Aggregation.scala index 6719b4045..d431ebc26 100644 --- a/main/src/main/scala/sbt/internal/Aggregation.scala +++ b/main/src/main/scala/sbt/internal/Aggregation.scala @@ -22,8 +22,9 @@ object Aggregation { def defaultShow(state: State, showTasks: Boolean): ShowConfig = ShowConfig(settingValues = true, taskValues = showTasks, s => state.log.info(s), success = true) def printSettings(xs: Seq[KeyValue[_]], print: String => Unit)(implicit display: Show[ScopedKey[_]]) = xs match { - case KeyValue(_, x) :: Nil => print(x.toString) - case _ => xs foreach { case KeyValue(key, value) => print(display(key) + "\n\t" + value.toString) } + case KeyValue(_, x: Seq[_]) :: Nil => print(x.mkString("* ", "\n* ", "")) + case KeyValue(_, x) :: Nil => print(x.toString) + case _ => xs foreach { case KeyValue(key, value) => print(display(key) + "\n\t" + value.toString) } } type Values[T] = Seq[KeyValue[T]] type AnyKeys = Values[_]