Skip to content

Adding --no-emit option results in error #1237

@jonhue

Description

@jonhue

Adding the option .option('--no-emit', 'description') to a command results in the following error when running bin cmd -h:

/mnt/c/code/tony-lang/cli/node_modules/commander/index.js:1495
    this.emit(this._helpLongFlag);
         ^

TypeError: this.emit is not a function
    at Command.outputHelp (/mnt/c/code/tony-lang/cli/node_modules/commander/index.js:1495:10)
    at outputHelpIfRequested (/mnt/c/code/tony-lang/cli/node_modules/commander/index.js:1645:9)
    at Command._parseCommand (/mnt/c/code/tony-lang/cli/node_modules/commander/index.js:893:7)
    at Command._dispatchSubcommand (/mnt/c/code/tony-lang/cli/node_modules/commander/index.js:860:18)
    at Command._parseCommand (/mnt/c/code/tony-lang/cli/node_modules/commander/index.js:877:12)
    at Command.parse (/mnt/c/code/tony-lang/cli/node_modules/commander/index.js:712:10)
    at Object.<anonymous> (/mnt/c/code/tony-lang/cli/dist/index.js:26:20)
    at Module._compile (internal/modules/cjs/loader.js:1151:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1171:10)
    at Module.load (internal/modules/cjs/loader.js:1000:32)

Is this expected?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions