I tried to reproduce it. But yargs worked for me. Both app -o a -o b and app -o a b printed o: ['a', 'b']. The first approach also worked with typed-cli. Can you provide with a code sample of what you mean exactly?
Turns out it was not choices that was the culprit but requiresArg. It's an embarrasing, long-standing bug in yargs. I made a PR to revert the commit that introduced it.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I tried to reproduce it. But yargs worked for me. Both
app -o a -o b
andapp -o a b
printedo: ['a', 'b']
. The first approach also worked withtyped-cli
. Can you provide with a code sample of what you mean exactly?Turns out it was not
choices
that was the culprit butrequiresArg
. It's an embarrasing, long-standing bug in yargs. I made a PR to revert the commit that introduced it.