Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async run(argv: Argv): Promise {
const { command: cmd, errors, options, params, rest } = parseInContext(
argv,
arg => this.getCommand(arg)?.getParserOptions(),
);
// Display version and exit
if (options.version) {
console.log(this.options.version);
return;
}
// Display errors and exit
if (errors.length > 0) {
throw new Error('TODO');
}