Fix issue where verbosity wasn't working on subcommands (#4147)

This commit is contained in:
Anthony Keenan 2018-11-01 11:34:14 +00:00 committed by GitHub
parent 777026eb79
commit 7ca1dd5848
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -97,7 +97,7 @@ fun CordaCliWrapper.start(args: Array<String>) {
exitProcess(ExitCodes.SUCCESS)
} catch (e: ExecutionException) {
val throwable = e.cause ?: e
if (this.verbose) {
if (this.verbose || this.subCommands().any { it.verbose} ) {
throwable.printStackTrace()
} else {
System.err.println("*ERROR*: ${throwable.rootMessage ?: "Use --verbose for more details"}")