8000 Breaking change related to short options in 6.0.0? · Issue #1318 · tj/commander.js · GitHub
[go: up one dir, main page]

Skip to content
Breaking change related to short options in 6.0.0? #1318
@martinlevesque

Description

@martinlevesque

Hey,

Previously the following:

commander
    .command('logs')
    .option("-n <nb-lines>", "Number of lines")
    .description('Print logs')
    .action(async function(opts) {
      ....

The option n was populated in opts.N (note the capital letter), but now it is no more available opts.N but is now available in opts.n. Is it a bug or the correct new behaviour?

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsREADME (or other docs) could be improved

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0