Skip to content

Commit

Permalink
fix(@angular/cli): with no overrides dont throw (#12391)
Browse files Browse the repository at this point in the history
Configuration for yargs made it so the return value is different
now and triggers our logic to have extra overrides.

Fixes #12344.
  • Loading branch information
hansl authored and vikerman committed Sep 27, 2018
1 parent 3544325 commit 5c99662
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/angular/cli/models/architect-command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,12 @@ export abstract class ArchitectCommand extends Command<ArchitectCommandOptions>
delete overrides.project;
}

// For some reason, latest of yargs-parser with our configuration returns `{ _: [] }` if
// there's nothing to parse.
if (overrides._ && Array.isArray(overrides._) && overrides._.length == 0) {
delete overrides._;
}

if (!project) {
project = '';
}
Expand Down

0 comments on commit 5c99662

Please sign in to comment.