yargs: exception thrown when yargs.parsed.newAliases is undefined
Found something of an issue when using yargs.showHelp()
L761
it seems that when self._parseArgs(processArgs)
is called, it is not saving the results to self.parsed
if you put a breakpoint on this line: L1012, you will see that the self.parsed
property contains the appropriate items.
however, after this function is done, on L762,
self.parsed
is set back to false
instead of an object. this leads to their being a parse error:
TypeError: Cannot convert undefined or null to object
.concat(Object.keys(yargs.parsed.newAliases) || [])
under function: usage.showHelp(
L240
Thanks! 👍
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 1
- Comments: 17 (16 by maintainers)
I cannot replicate it in a single file, but with commands it is easy: