Skip to content

Commit

Permalink
refactor(cli): simplify argv and notFlags push (#5608)
Browse files Browse the repository at this point in the history
initial commit

Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
  • Loading branch information
timreichen and iuioiua authored Aug 2, 2024
1 parent 0d30f02 commit 8648c6d
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions cli/parse_args.ts
Original file line number Diff line number Diff line change
Expand Up @@ -768,14 +768,9 @@ export function parseArgs<
}

if (doubleDash) {
argv["--"] = [];
for (const key of notFlags) {
argv["--"].push(key);
}
argv["--"] = notFlags;
} else {
for (const key of notFlags) {
argv._.push(key);
}
argv._.push(...notFlags);
}

return argv as Args<TArgs, TDoubleDash>;
Expand Down

0 comments on commit 8648c6d

Please sign in to comment.