From 43403df23f5204fa9436c83a6025959c90240e48 Mon Sep 17 00:00:00 2001 From: mrozio13pl <41209892+mrozio13pl@users.noreply.github.com> Date: Thu, 9 Nov 2023 21:53:45 +0100 Subject: [PATCH] fix: `parse` function forcing arguments --- src/cli.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cli.ts b/src/cli.ts index e687b66..a6dbc7d 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -63,7 +63,7 @@ class Cli extends Command { * @param {string | string[]} args Arguments to parse. * @param {OfiOptions} options Parser options (they will be also used for every single command). */ - parse(args: string | string[] = process.argv.slice(2), options: OfiOptions): ParsedArguments | void { + parse(args: string | string[] = process.argv.slice(2), options: OfiOptions = {}): ParsedArguments | void { options = { camelize: true, 'populate--': true, ...options }; const _options = options; // this object will not include '--version' flag and will be passed to other commands