Skip to content

Option with three or more trailing hyphens parsed as positional argument #433

Description

@0x2b3bfa0

Description

yargs-parser@20.2.6 and later versions interpret options with three or more trailing hyphens as positional parameters. This issue only happens when options and values are separated with an equal sign.

Actual behavior

> require('yargs-parser')(["--option=---"])
{ _: [ '--option=---' ] }

Desired behavior

> require('yargs-parser')(["--option=---"])
{ _: [], option: '---' }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions