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

suggestion lies about existing argument #27336

Open
securesvet opened this issue Dec 11, 2024 · 0 comments
Open

suggestion lies about existing argument #27336

securesvet opened this issue Dec 11, 2024 · 0 comments

Comments

@securesvet
Copy link

securesvet commented Dec 11, 2024

Version: Deno 2.1.3

Going back to #27321 PR and #27318 Issue as I see the problem, styled suggestions lie about existing combinations of subcommand-argument

"'{}{subcommand} {arg}{}' exists",

Let's take deno lint as an instance

deno -A lint
error: unexpected argument '--allow-all' found

  tip: 'lint --allow-all' exists

Usage: deno lint [OPTIONS] [files]...

and as suggested:

$ deno lint -A
error: unexpected argument '-A' found

  tip: to pass '-A' as a value, use '-- -A'

Usage: deno lint [OPTIONS] [files]...

As I see the problem, fn flags_from_vec(args: Vec<OsString>) in cli/args/flags.rs lacks checking subcommand has such argument while error handling

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