Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spec is not inferred correctly for multi-value argument #127

Open
oakad opened this issue Jul 20, 2022 · 0 comments
Open

Spec is not inferred correctly for multi-value argument #127

oakad opened this issue Jul 20, 2022 · 0 comments

Comments

@oakad
Copy link

oakad commented Jul 20, 2022

Let's say I have a command with a multi-value argument of the following sort:

cmdArgs.StringsArgPtr(
	&cmd.args.srcs,
	"SOURCE_PATHS",
	nil,
	"Directories or files to load",
)

The automatically inferred spec for it will (incorrectly) be "something something SOURCE_PATHS". This will incorrectly reject multiple "source path" arguments with an "incorrect usage" error (only a single argument will be allowed).

The correct, working spec can be specified explicitly to fix the issue: "something something SOURCE_PATHS...".

However, it seems that multi-value argument constructor can be made a little smarter to add ellipsis to spec automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant