Skip to content

Commit 5c99662

Browse files
hanslvikerman
authored andcommitted
fix(@angular/cli): with no overrides dont throw (#12391)
Configuration for yargs made it so the return value is different now and triggers our logic to have extra overrides. Fixes #12344.
1 parent 3544325 commit 5c99662

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/angular/cli/models/architect-command.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,12 @@ export abstract class ArchitectCommand extends Command<ArchitectCommandOptions>
296296
delete overrides.project;
297297
}
298298

299+
// For some reason, latest of yargs-parser with our configuration returns `{ _: [] }` if
300+
// there's nothing to parse.
301+
if (overrides._ && Array.isArray(overrides._) && overrides._.length == 0) {
302+
delete overrides._;
303+
}
304+
299305
if (!project) {
300306
project = '';
301307
}

0 commit comments

Comments
 (0)