diff --git a/src/main/kotlin/com/r3corda/demos/TraderDemo.kt b/src/main/kotlin/com/r3corda/demos/TraderDemo.kt index c1e6fce49c..c5f62ea2b2 100644 --- a/src/main/kotlin/com/r3corda/demos/TraderDemo.kt +++ b/src/main/kotlin/com/r3corda/demos/TraderDemo.kt @@ -84,7 +84,7 @@ fun runTraderDemo(args: Array): Int { parser.parse(*args) } catch (e: Exception) { println(e.message) - println("Please refer to the documentation in docs/build/index.html to learn how to run the demo.") + printHelp(parser) return 1 } @@ -377,3 +377,13 @@ private class TraderDemoProtocolSeller(val otherSide: Party, } } + +private fun printHelp(parser: OptionParser) { + println(""" + Usage: trader-demo --role [BUYER|SELLER] [options] + Please refer to the documentation in docs/build/index.html for more info. + + """.trimIndent()) + parser.printHelpOn(System.out) +} +