@@ -5,12 +5,6 @@ const Command = require('../ember-cli/lib/models/command');
55const stringUtils = require ( 'ember-cli-string-utils' ) ;
66const lookupCommand = require ( '../ember-cli/lib/cli/lookup-command' ) ;
77
8- const commandsToIgnore = [
9- 'easter-egg' ,
10- 'init' ,
11- 'destroy'
12- ] ;
13-
148const HelpCommand = Command . extend ( {
159 name : 'help' ,
1610 description : 'Shows help for the CLI.' ,
@@ -27,10 +21,6 @@ const HelpCommand = Command.extend({
2721 . map ( file => path . parse ( file ) . name )
2822 . map ( file => file . toLowerCase ( ) ) ;
2923
30- commandFiles = commandFiles . filter ( file => {
31- return commandsToIgnore . indexOf ( file ) < 0 ;
32- } ) ;
33-
3424 let commandMap = commandFiles . reduce ( ( acc : any , curr : string ) => {
3525 let classifiedName = stringUtils . classify ( curr ) ;
3626 let defaultImport = require ( `./${ curr } ` ) . default ;
@@ -45,15 +35,19 @@ const HelpCommand = Command.extend({
4535 }
4636
4737 commandFiles . forEach ( cmd => {
48- let Command = lookupCommand ( commandMap , cmd ) ;
38+ const Command = lookupCommand ( commandMap , cmd ) ;
4939
50- let command = new Command ( {
40+ const command = new Command ( {
5141 ui : this . ui ,
5242 project : this . project ,
5343 commands : this . commands ,
5444 tasks : this . tasks
5545 } ) ;
5646
47+ if ( command . hidden || command . unknown ) {
48+ return ;
49+ }
50+
5751 if ( rawArgs . length > 0 ) {
5852 let commandInput = rawArgs [ 0 ] ;
5953 const aliases = Command . prototype . aliases ;
0 commit comments