commandline icon indicating copy to clipboard operation
commandline copied to clipboard

Better error message for missing value arguments

Open hol430 opened this issue 5 years ago • 3 comments

Fixes #363

The problem shows up when using an argument like this:

[Value(0, Min = 1, HelpText = "Path(s) to file(s)", Required = true)]
public IEnumerable<string> FilePaths { get; }

Calling the CLI without providing a value for this argument will currently result in the following error:

ERROR(S): A sequence value not bound to option name is defined with few items than required.

This patch changes the behaviour so that, iff a MetaName is provided in the ValueAttribute, the user of the CLI will receive a message along the lines of:

ERROR(S): Required option '$MetaName' is missing.

hol430 avatar Dec 14 '20 23:12 hol430

Any chance this could be merged? It looks like this project isn't very active. Is anyone maintaining this?

dalehenries avatar Jul 29 '21 04:07 dalehenries

bump

JohnGrat avatar Oct 20 '22 10:10 JohnGrat

Ha, I had forgotten that this PR even existed. And the issue has been around for longer still :). @ericnewton76 - apologies for the ping, but is there anything I can do to help get this merged? I'm happy to tweak this as needed. Just let me know if there's anything you need from me.

hol430 avatar Oct 21 '22 02:10 hol430