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

Reenable allowUnknownFlags: false when meow#197 is fixed #39

Open
msabramo opened this issue Sep 16, 2021 · 1 comment
Open

Reenable allowUnknownFlags: false when meow#197 is fixed #39

msabramo opened this issue Sep 16, 2021 · 1 comment

Comments

@msabramo
Copy link
Contributor

msabramo commented Sep 16, 2021

In cli.js:

	// TODO: Disabled until https://github.com/sindresorhus/meow/issues/197 is fixed.
	// allowUnknownFlags: false,

Without this, users get strange, nonsensical errors when they provide an unknown flag:

$ node cli.js --foobar "I got your input right here"
Input required
@msabramo msabramo changed the title Reenable allowUnknownFlags: false when https://github.com/sindresorhus/meow/issues/197 is fixed Reenable allowUnknownFlags: false when meow#197 is fixed Sep 16, 2021
@msabramo
Copy link
Contributor Author

One way to fix this sooner rather than later is what I suggested in #33 (comment), but I think @sindresorhus might not want to go that way.

msabramo added a commit to msabramo/chalk-cli that referenced this issue Sep 27, 2021
msabramo added a commit to msabramo/chalk-cli that referenced this issue Sep 27, 2021
msabramo added a commit to msabramo/chalk-cli that referenced this issue Sep 27, 2021
Currently, `allowUnknownFlags: false` is commented out, which is not
ideal, because the error message the user gets when using an unknown
flag is pretty confusing:

```
$ chalk --foobar
Input required
```

The actual problem is in meow (see meow#197), but it's been taking a
while to come up with a proper fix for that (see meow#198), so I suggest
using this workaround in the meantime.

See: chalk#32, chalk#33, chalk#39, meow#197, meow#198
msabramo added a commit to msabramo/chalk-cli that referenced this issue Sep 27, 2021
Currently, `allowUnknownFlags: false` is commented out, which is not
ideal, because the error message the user gets when using an unknown
flag is pretty confusing:

```
$ chalk --foobar
Input required
```

The actual problem is in meow (see sindresorhus/meow#197), but it's been
taking a while to come up with a proper fix for that (see
sindresorhus/meow#198), so I suggest using this workaround in the
meantime.

See: chalk#32, chalk#33, chalk#39, sindresorhus/meow#197, sindresorhus/meow#198
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