sindresorhus / meow

🐈 CLI app helper
MIT License
3.54k stars 151 forks source link

Make `--help` and `--version` work with `allowUnknownFlags: false` #198

Closed msabramo closed 2 years ago

msabramo commented 3 years ago

Make --help and --version work with allowUnknownFlags: false

Fixes #197

Issue originally discovered with chalk-cli in https://github.com/chalk/chalk-cli/issues/32

sindresorhus commented 3 years ago

Can you add tests? 🙏

msabramo commented 3 years ago

Yeah I thought of that right after I submitted this. 😄

msabramo commented 3 years ago

See 368e760 for tests.

Unfortunately, I think my change broke 20 other unrelated existing tests, so I may have to think of a better way to accomplish the fix without affecting other stuff.

msabramo commented 3 years ago

OK, I got all the tests passing, but honestly I feel like I was hacking around without really understanding what the behavior should be. So someone should take a close look and make sure I didn't mess things up.

sindresorhus commented 3 years ago

So someone should take a close look and make sure I didn't mess things up.

That someone is me and I don't think I'll time to review this in detail for quite some time, unfortunately.

sindresorhus commented 2 years ago

Closing for lack of activity.