Skip to content

Access to command name #18

@MikeTaylor

Description

@MikeTaylor

It would be helpful if I could access the command-name (the basename of process.argv[1]) from the opts structure, so I can use it in other error messages. Something like:

opt.parseSystem();
if (!parseFile(opt.argv[0])) {
  console.error(`${opt.command}: could not parse file ${opt.argv[0]}`);
  process.exit(1);
}

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