From a1580bafbf7e952f32ab437b66a26b8ab2ec75f6 Mon Sep 17 00:00:00 2001 From: Ethan Atkins Date: Wed, 10 Oct 2018 18:27:22 -0700 Subject: [PATCH] Improve error message Previously, the invalid commands would be wrapped in 'Left($CMD)'. --- main-command/src/main/scala/sbt/Watched.scala | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/main-command/src/main/scala/sbt/Watched.scala b/main-command/src/main/scala/sbt/Watched.scala index 0e9bc670e..57267bb2e 100644 --- a/main-command/src/main/scala/sbt/Watched.scala +++ b/main-command/src/main/scala/sbt/Watched.scala @@ -286,9 +286,8 @@ object Watched { val terminationAction = watch(in, task, config) config.onWatchTerminated(terminationAction, command, state) } else { - config.logger.error( - s"Terminating watch due to invalid command(s): ${invalid.mkString("'", "', '", "'")}" - ) + val commands = invalid.flatMap(_.left.toOption).mkString("'", "', '", "'") + config.logger.error(s"Terminating watch due to invalid command(s): $commands") state.fail } }