File tree 1 file changed +5
-2
lines changed
packages/@angular/cli/commands
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -64,8 +64,11 @@ export default Command.extend({
64
64
] ,
65
65
66
66
getCollectionName ( rawArgs : string [ ] , parsedOptions ?: { collection ?: string } ) : [ string , string ] {
67
+ let collectionName : string = CliConfig . getValue ( 'defaults.schematics.collection' ) ;
68
+ if ( ! rawArgs || rawArgs . length === 0 ) {
69
+ return [ collectionName , null ] ;
70
+ }
67
71
let schematicName = rawArgs [ 0 ] ;
68
- let collectionName = CliConfig . getValue ( 'defaults.schematics.collection' ) ;
69
72
70
73
if ( schematicName . match ( / : / ) ) {
71
74
[ collectionName , schematicName ] = schematicName . split ( ':' , 2 ) ;
@@ -206,7 +209,7 @@ export default Command.extend({
206
209
207
210
printDetailedHelp : function ( _options : any , rawArgs : any ) : string | Promise < string > {
208
211
const engineHost = getEngineHost ( ) ;
209
- const collectionName = this . getCollectionName ( ) ;
212
+ const [ collectionName ] = this . getCollectionName ( ) ;
210
213
const collection = getCollection ( collectionName ) ;
211
214
const schematicName = rawArgs [ 1 ] ;
212
215
if ( schematicName ) {
You can’t perform that action at this time.
0 commit comments