Skip to content

Access to command name #18

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);
}

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions