You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I got the same(?) issue. I have the following configuration:
| lyra::arg(configFile, "/path/to/config.json")
("Path to the config")
| lyra::opt(outputPath, "/path/to/folder/")
["--output"]
("Path to the output folder")
If I run my tool this way:
$ my-tool --output /tmp/some
then I get the problem decribed in the first post:
Unrecognized token: /tmp/some
And if I run it like this:
$ my-tool --output=/tmp/some
then it considers the entire --output=/tmp/some to be the value for configFile argument.
If I put the argument after the option:
| lyra::opt(outputPath, "/path/to/folder/")
["--output"]
("Path to the output folder")
| lyra::arg(configFile, "/path/to/config.json")
("Path to the config")
then everything works fine.
So yes, this is either a bug or a missing documentation saying that arguments should be added after options.
Results:
Run:
<exe> --flag-this --flag-extra
Output:
this |1| that |0| extra |1|
Run:
<exe> --flag-extra --flag-this
Output:
Unrecognized token: --flag-this
Looks like a bug. The order should not matter.
The text was updated successfully, but these errors were encountered: