Skip to content

Version 21.1.0 breaks "--"-related configuration #453

@Toberumono

Description

@Toberumono

As of version 21.1.0, configuring yargs-parser with {"populate--": true, "unknown-options-as-args": true, "halt-at-non-option": true} results in every non-flag being put in "--" regardless of whether it is part of a valid command.
Prior to version 21.1.0, non-flags were excluded from "--" provided that they were part of a valid command.
Example
Command: node foo.js validCommand
Expected behavior: executes the command "validCommand"
Actual: places "validCommand" in the "--" array.

Effectively, it is treating every command as invalid.

Unfortunately, I cannot build directly because version 21.1.0's type bindings are broken, and I'm using TypeScript, so I can't dig into it properly at this time.

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