File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ const npa = require('npm-package-arg');
2525
2626export class AddCommand extends SchematicCommand < AddCommandSchema > {
2727 readonly allowPrivateSchematics = true ;
28+ readonly allowAdditionalArgs = true ;
2829 readonly packageManager = getPackageManager ( this . workspace . root ) ;
2930
3031 async run ( options : AddCommandSchema & Arguments ) {
Original file line number Diff line number Diff line change @@ -77,6 +77,7 @@ export abstract class SchematicCommand<
7777 T extends ( BaseSchematicSchema & BaseCommandOptions ) ,
7878> extends Command < T > {
7979 readonly allowPrivateSchematics : boolean = false ;
80+ readonly allowAdditionalArgs : boolean = false ;
8081 private _host = new NodeJsSyncHost ( ) ;
8182 private _workspace : experimental . workspace . Workspace ;
8283 private readonly _engine : Engine < FileSystemCollectionDesc , FileSystemSchematicDesc > ;
@@ -438,7 +439,7 @@ export abstract class SchematicCommand<
438439 }
439440
440441 // ng-add is special because we don't know all possible options at this point
441- if ( args [ '--' ] && schematicName !== 'ng-add' ) {
442+ if ( args [ '--' ] && ! this . allowAdditionalArgs ) {
442443 args [ '--' ] . forEach ( additional => {
443444 this . logger . fatal ( `Unknown option: '${ additional . split ( / = / ) [ 0 ] } '` ) ;
444445 } ) ;
You can’t perform that action at this time.
0 commit comments