Improve error message

Previously, the invalid commands would be wrapped in 'Left($CMD)'.
This commit is contained in:
Ethan Atkins 2018-10-10 18:27:22 -07:00
parent d9e8ae18b2
commit a1580bafbf
1 changed files with 2 additions and 3 deletions

View File

@ -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
}
}