Skip to content

Commit

Permalink
fix(@angular/cli): Fix add command collection arg parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
Brocco authored and hansl committed Mar 23, 2018
1 parent b056924 commit 7d04c9c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/@angular/cli/commands/add.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default class AddCommand extends SchematicCommand {
}

validate(options: any) {
const collectionName = options.argv[0];
const collectionName = options._[0];

if (!collectionName) {
throw new SilentError(
Expand All @@ -40,7 +40,7 @@ export default class AddCommand extends SchematicCommand {
}

async run(options: any) {
const collectionName = options.collection;
const collectionName = options._[0];

if (!collectionName) {
throw new SilentError(
Expand Down

0 comments on commit 7d04c9c

Please sign in to comment.