Support --help in daml trigger/daml script/daml script-test (#4534)

fixes #4529
fixes #4530
fixes #4531

changelog_begin
changelog_end
This commit is contained in:
Moritz Kiefer 2020-02-17 09:09:01 +01:00 committed by GitHub
parent 6577ae2556
commit c64919cd58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 1 deletions

View File

@ -72,6 +72,8 @@ object RunnerConfig {
}
.text("Path to a file containing the input value for the script in JSON format.")
help("help").text("Print this usage text")
checkConfig(c => {
if (c.ledgerHost.isDefined != c.ledgerPort.isDefined) {
failure("Must specify both --ledger-host and --ledger-port")

View File

@ -53,6 +53,8 @@ object TestConfig {
}
.text("TTL in seconds used for commands emitted by the trigger. Defaults to 30s.")
help("help").text("Print this usage text")
checkConfig(c => {
if (c.ledgerHost.isDefined != c.ledgerPort.isDefined) {
failure("Must specify both --ledger-host and --ledger-port")

View File

@ -92,7 +92,7 @@ else
fi
cat > $DAML_HOME/bin/daml-head << EOF
#!/bin/bash
#!/bin/sh
exec env DAML_SDK_VERSION=0.0.0 $DAML_HEAD_SDK/daml/daml "\$@"
EOF
chmod +x $DAML_HOME/bin/daml-head

View File

@ -70,6 +70,8 @@ object RunnerConfig {
}
.text("File from which the access token will be read, required to interact with an authenticated ledger")
help("help").text("Print this usage text")
cmd("list")
.action((_, c) => c.copy(listTriggers = true))
.text("List the triggers in the DAR.")