Skip to content

Commit

Permalink
fix(cli): don't fail if the argument contains multiple '--'
Browse files Browse the repository at this point in the history
  • Loading branch information
sezanzeb committed Jul 14, 2023
1 parent e21dd65 commit 72f94f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/utils/remaining-flags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function getRemainingFlags(cli: CommanderStatic) {
const prevKeyRaw = array[index - 1];
if (prevKeyRaw) {
const previousKey = camelCase(
prevKeyRaw.replace('--', '').replace('no', ''),
prevKeyRaw.replace(/--/g, '').replace('no', ''),
);
if (cli[previousKey] === item) {
return false;
Expand Down

0 comments on commit 72f94f1

Please sign in to comment.