cli: Handle INVALID_REQUEST response
MODIFY
packages/@romejs/cli/cli.ts
packages/@romejs/cli/cli.ts
@@ -155,6 +155,8 @@ export default async function cli() {
category: local.category,
description: local.description,
defineFlags: local.defineFlags,
+ examples: local.examples,
+ usage: local.usage,
callback(_commandFlags) {
if (local.defineFlags !== undefined) {
commandFlags = _commandFlags;
@@ -174,6 +176,8 @@ export default async function cli() {
category: master.category,
description: master.description,
defineFlags: master.defineFlags,
+ usage: master.usage,
+ examples: master.examples,
callback(_commandFlags) {
if (master.defineFlags !== undefined) {
@@ -355,6 +359,11 @@ export default async function cli() {
process.exit(1);
break;
+ case 'INVALID_REQUEST':
+ await p.showHelp();
+ process.exit(1);
+ break;
+
case 'DIAGNOSTICS':
process.exit(1);
break;

cli: Handle INVALID_REQUEST response