Closed alexmcmanus closed 3 years ago
Hi!
I don't know if I should post this here or on the issue, but a shorter solution, that doesn't require an additional dependency would be to pass argv
instead of flags
when getMissingRequiredFlags
is called, because argv
has the kebab-case flags as well as the camelCase variations, but only the camelCase variation is available in flags
.
Thanks for your feedback. The new dependency is an existing transitive dependency made explicit, but I agree your solution is simpler. I'm happy to make the change, but I'm not too sure this general approach is acceptable to the project maintainer, as it seems flags are supposed to be defined in camelCase. I'll post another comment and see if we can agree an approach. Thanks again.
Closing in favor of https://github.com/sindresorhus/meow/issues/165#issuecomment-712394008
Fix for #165 - the isRequired option is broken if the flag is defined in camel-case.