improve argument parsing
fail fast by parsing arguments before command execution instead of on demand
This commit is contained in:
@@ -95,9 +95,7 @@ class Command private constructor(
|
||||
)
|
||||
}
|
||||
|
||||
fun cli(
|
||||
block: Command.Builder.() -> Unit,
|
||||
): Command {
|
||||
fun cli(block: Command.Builder.() -> Unit): Command {
|
||||
val builder = Command.Builder(-1, null)
|
||||
builder.block()
|
||||
return builder.build()
|
||||
|
||||
Reference in New Issue
Block a user