Skip to content

3 arguments with custom parse functions cause an exception #1779

Open
@Tunduk

Description

@Tunduk

Hi!
I think it's continue of this issue

If create a command that accept 3 arguments with custom parse functions it'll fail.
If command called with 1 token then 3rd argument will return empty array. If command called with more that 1 argument (like "1 2 3") then it'll throw an exception

Test code with an example test.txt

I am not very familiar with System.CommandLine code but I think the problem in ParseOperation.ParseCommandArguments function. Third argument isn't added because of arity of second argument.

Bug was found during review this PR

Let me know if you need more information.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions