From 65fe05189be05a391c420488c4b5b42644c528c8 Mon Sep 17 00:00:00 2001 From: Kevin Locke Date: Mon, 31 Jan 2022 04:33:20 -0700 Subject: [PATCH] fix: use InvalidArgumentError for commander errors InvalidOptionArgumentError was renamed to InvalidArgumentError in https://github.com/tj/commander.js/pull/1508 for commander@8.0.0. Signed-off-by: Kevin Locke --- cli.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli.js b/cli.js index 9fcbefb..5baee0d 100644 --- a/cli.js +++ b/cli.js @@ -108,7 +108,7 @@ export default async function modulenameMain(args, options) { // If a non-Commander error was thrown, treat it as unhandled. // It probably represents a bug and has not been written to stdout/stderr. - // throw commander.{CommanderError,InvalidOptionArgumentError} to avoid. + // throw commander.{CommanderError,InvalidArgumentError} to avoid. if (typeof errParse.code !== 'string' || !errParse.code.startsWith('commander.')) { throw errParse;