From 5c996626ea1ab0bae03d2996fd53c11f4b84b235 Mon Sep 17 00:00:00 2001 From: Hans Date: Thu, 27 Sep 2018 17:24:31 -0400 Subject: [PATCH] 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. --- packages/angular/cli/models/architect-command.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/angular/cli/models/architect-command.ts b/packages/angular/cli/models/architect-command.ts index aacacfe9a588..c06a56a21c34 100644 --- a/packages/angular/cli/models/architect-command.ts +++ b/packages/angular/cli/models/architect-command.ts @@ -296,6 +296,12 @@ export abstract class ArchitectCommand extends Command 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 = ''; }