Skip to content

Commit b959883

Browse files
alan-agius4vikerman
authored andcommitted
fix(@angular/cli): don't add leftovers when there are none
At the moment we are adding leftover args to `--` even when it's an empty array, this causes schematics without arguments to fail silently, because of https://github.com/angular/angular-cli/blob/07780b9272d985606d318da16d732dd28a41d592/packages/angular/cli/models/schematic-command.ts#L463 Fixes: #15156
1 parent a9ac221 commit b959883

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/angular/cli/models/parser.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,9 @@ export function parseFreeFormArguments(args: string[]): Arguments {
269269
}
270270
}
271271

272-
parsedOptions['--'] = leftovers;
272+
if (leftovers.length) {
273+
parsedOptions['--'] = leftovers;
274+
}
273275

274276
return parsedOptions;
275277
}

0 commit comments

Comments
 (0)