Skip to content

Commit

Permalink
fix(@angular/cli): run --help-json now returns a basic help
Browse files Browse the repository at this point in the history
It was throwing an exception about some targets not being available.
hansl committed Sep 15, 2018
1 parent c2f9e0b commit 84e4e8d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/angular/cli/models/architect-command.ts
Original file line number Diff line number Diff line change
@@ -93,6 +93,11 @@ export abstract class ArchitectCommand<
}

if ((!targetSpec.project || !targetSpec.target) && !this.multiTarget) {
if (options.help || options.helpJson) {
// This is a special case where we just return.
return;
}

throw new Error('Cannot determine project or target for Architect command.');
}

0 comments on commit 84e4e8d

Please sign in to comment.