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
but let's walk through a hypothetical example with just two args the first of which is optional: my-command [--optional-arg] required-arg.
As far as I can tell, what this will do is:
If called with one argument, initialize the optional arg with that value and leave the required arg uninitialized.
If called with three arguments, init the optional arg with the first argument, then try to match the second arg against the string "--required-arg", etc.
Proposed Solution
Either fix the code in Command::InitArguments or fix the ordering so the optional arguments really do come last.
The text was updated successfully, but these errors were encountered:
Problem
After #11749 the behavior of chip-tool is as follows:
But what happens if the optional arg is not at the end? A real-life example of this is:
but let's walk through a hypothetical example with just two args the first of which is optional:
my-command [--optional-arg] required-arg
.As far as I can tell, what this will do is:
Proposed Solution
Either fix the code in
Command::InitArguments
or fix the ordering so the optional arguments really do come last.The text was updated successfully, but these errors were encountered: