Skip to content

Short option property does not update when using long option #150

Description

@shanoaice

Issue Type

  • Bug Report
  • Feature Request
  • Other

Expected

I got such code:

cli.option('-b, --base-url <baseUrl>', 'Set the instance URL', {
	default: 'https://github.com',
})

const opt = cli.parse()

console.log(opt)

When I run with --base-url "https://gitlab.com", I expect it to output such object:

{
  args: [],
  options: { '--': [], b: 'https://gitlab.com', baseUrl: 'https://gitlab.com' }
}

Actual

Instead it gives me this:

{
  args: [],
  options: { '--': [], b: 'https://github.com', baseUrl: 'https://gitlab.com' }
}

Info

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

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions