From 7cefdaaddb44ad9f661b07ac4b23625ecfe921c0 Mon Sep 17 00:00:00 2001 From: Vojtech Masek Date: Wed, 4 Sep 2024 19:11:30 +0200 Subject: [PATCH] feat(cli): do not show help on error Signed-off-by: Vojtech Masek --- packages/cli/src/lib/yargs-cli.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/lib/yargs-cli.ts b/packages/cli/src/lib/yargs-cli.ts index 11c9c9fc8..92bee9aa5 100644 --- a/packages/cli/src/lib/yargs-cli.ts +++ b/packages/cli/src/lib/yargs-cli.ts @@ -71,8 +71,9 @@ export function yargsCli( // take minimum of TERMINAL_WIDTH or full width of the terminal .wrap(Math.max(TERMINAL_WIDTH, cli.terminalWidth())) .help('help', descriptionStyle('Show help')) - .version('version', dim`Show version`, version) .alias('h', 'help') + .showHelpOnFail(false) + .version('version', dim`Show version`, version) .check(args => { const persist = args['persist'] as PersistConfig | undefined; return persist == null || validatePersistFormat(persist);