Closed sn0wcat closed 4 years ago
See #1226 for explanation and work-around.
Covered by the linked issue. Added to the Triage item for future reference. Closing this as resolved.
Feel free to open a new issue if it comes up again, with new information and renewed interest.
Hello @shadowspawn I've got the same problem in project https://github.com/acacode/swagger-typescript-api
If you have a free time please check the commander declaration in this file
https://github.com/acacode/swagger-typescript-api/blob/next/index.js
Also if you need steps to reproduce I have spec test for cli commands (npm run test:--cli
on next
branch)
This bug happened after update commander
from ^6.2.1
to ^9.4.0
Sorry, it was my bad, after update was needed to read more documentation about fresh version.
For someone, who dig into this problem too - you should remove .storeOptionsAsProperties(true)
and take your program options from program.opts()
instead of program.yourOption
as it was before
Commander in version 5.1.0 seems to have problems with option called name in subcommand
this typescript command snippet works:
but replace the --agentname with --name in options
and you will get a following exception:
Used node version