Skip to content

Commit

Permalink
fix(core): ensure target-only argument is rewritten correctly to be f…
Browse files Browse the repository at this point in the history
…orwarded (#17971)
  • Loading branch information
MarkMcCulloh authored Sep 21, 2023
1 parent 5545ffb commit 91b1451
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/nx/bin/init-local.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@ function rewritePositionalArguments(args: string[]) {
const relevantPositionalArgs = [];
const rest = [];
for (let i = 2; i < args.length; i++) {
if (!args[i].startsWith('-')) {
if (args[i] === '--') {
rest.push(...args.slice(i + 1));
break;
} else if (!args[i].startsWith('-')) {
relevantPositionalArgs.push(args[i]);
if (relevantPositionalArgs.length === 2) {
rest.push(...args.slice(i + 1));
Expand Down

0 comments on commit 91b1451

Please sign in to comment.