[skip ci] improve cli messages

This commit is contained in:
ansgarz 2022-02-26 12:37:48 +01:00
parent d534ea9fa3
commit 9c29d229e6
2 changed files with 3 additions and 3 deletions

View file

@ -8,13 +8,13 @@ import org.domaindrivenarchitecture.provs.configuration.domain.TargetCliCommand
open class CliTargetParser(name: String) : ArgParser(name) { open class CliTargetParser(name: String) : ArgParser(name) {
val target by argument( val target by argument(
ArgType.String, ArgType.String,
description = "target: either 'local' or remote with 'user[:password]@host' (e.g. 'username@somehost.com' without password for ssh-key authorization)", description = "target: either 'local' or remote with 'user[:password]@host'",
) )
val passwordInteractive by option( val passwordInteractive by option(
ArgType.Boolean, ArgType.Boolean,
"password-interactive", "password-interactive",
"p", "p",
"prompt for password", "prompt for password for remote target",
).default(false) ).default(false)
} }

View file

@ -11,7 +11,7 @@ import kotlin.system.exitProcess
*/ */
fun main(args: Array<String>) { fun main(args: Array<String>) {
val cmd = CliArgumentsParser("java -jar provs-desktop.jar").parseCommand(args) val cmd = CliArgumentsParser("provs-desktop.jar subcommand target").parseCommand(args)
if (!cmd.isValid()) { if (!cmd.isValid()) {
println("Arguments are not valid, pls try option -h for help.") println("Arguments are not valid, pls try option -h for help.")
exitProcess(1) exitProcess(1)