Skip to content

Commit

Permalink
feat(cli): do not show help on error
Browse files Browse the repository at this point in the history
Signed-off-by: Vojtech Masek <vojtech@flowup.cz>
  • Loading branch information
vmasek committed Sep 9, 2024
1 parent 4f304f2 commit 7cefdaa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/cli/src/lib/yargs-cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,9 @@ export function yargsCli<T = unknown>(
// 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);
Expand Down

0 comments on commit 7cefdaa

Please sign in to comment.