Skip to content

Provide access to the allowUnknownOption complaints #903

@JoshuaKGoldberg

Description

@JoshuaKGoldberg

There's no way I can find to find which args are unsupported. In this

program..allowUnknownOption();

// error on unknown commands
program.on('command:*', function () {
  console.error('Invalid command: %s\nSee --help for a list of available commands.', program.args.join(' '));
  process.exit(1);
});

The function receives no arguments and command.args is empty in my usage. Can there be a command.unknownOptions added to store the ones added?

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