Skip to content

exception thrown when yargs.parsed.newAliases is undefined #1144

@oscarocornejo

Description

@oscarocornejo

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! 👍

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions