-
Notifications
You must be signed in to change notification settings - Fork 89
-- does not prevent options interpretation #225
Copy link
Copy link
Closed
Labels
Description
-- does not prevent options interpretation. So it is impossible to resolve ambiguous options vs args situation.
Reproducer:
private val opts = Options.text("abc")
private val args = Args.text("args").*
override def cliApp: CliApp[Any with ZIOAppArgs with Scope, Any, Any] =
CliApp.make(
"test",
"0.1.0",
HelpDoc.Span.text("Reproduce -- issue"),
command = Command("test", opts.optional, args)
) { (opts, args) =>
ZIO.debug(s"opts: $opts") *>
ZIO.debug(s"args: $args")
}Command: ./bin/test -- --abc text
Expected result: empty options, args == List("--abc", "text").
Actual result:
$ ./bin/test -- --abc text
opts: Some(text)
args: List()There is no way to convince the app that --abc is not an option name, but argument.
See reproducer here: https://github.com/senia-psm/zio-cli-225
Reactions are currently unavailable