From 74438d0c725da5dad36746c1cfceaacc16e56f86 Mon Sep 17 00:00:00 2001 From: Mark Harrah Date: Mon, 17 Jun 2013 12:06:13 -0400 Subject: [PATCH] handle empty help list in aligned printing --- main/command/src/main/scala/sbt/CommandUtil.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/command/src/main/scala/sbt/CommandUtil.scala b/main/command/src/main/scala/sbt/CommandUtil.scala index cafe7adc5..467da6a33 100644 --- a/main/command/src/main/scala/sbt/CommandUtil.scala +++ b/main/command/src/main/scala/sbt/CommandUtil.scala @@ -21,7 +21,7 @@ object CommandUtil try { state.configuration.provider.scalaProvider.launcher.bootDirectory } catch { case e: NoSuchMethodError => new File(".").getAbsoluteFile } - def aligned(pre: String, sep: String, in: Seq[(String, String)]): Seq[String] = + def aligned(pre: String, sep: String, in: Seq[(String, String)]): Seq[String] = if(in.isEmpty) Nil else { val width = in.map(_._1.length).max in.map { case (a, b) => (pre + fill(a, width) + sep + b) }