Skip to content

Commit

Permalink
fix(@angular/cli): don't add leftovers when there are none
Browse files Browse the repository at this point in the history
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
  • Loading branch information
alan-agius4 authored and vikerman committed Jul 29, 2019
1 parent f2ee4f6 commit 1d7d6de
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/angular/cli/models/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,9 @@ export function parseFreeFormArguments(args: string[]): Arguments {
}
}

parsedOptions['--'] = leftovers;
if (leftovers.length) {
parsedOptions['--'] = leftovers;
}

return parsedOptions;
}
Expand Down

0 comments on commit 1d7d6de

Please sign in to comment.