File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -4,15 +4,18 @@ const cmdArgs = require('command-line-args');
44
55require ( './utils/process-log' ) ;
66
7- const helpFlagPresent = args => args . find ( arg => [ 'help' , '--help' ] . indexOf ( arg ) !== - 1 ) ;
7+ const isHelpFlagPresent = args => args . find ( arg => [ 'help' , '--help' ] . indexOf ( arg ) !== - 1 ) ;
88
99const normalizeFlags = ( args , command ) => args . slice ( 2 ) . filter ( arg => arg . indexOf ( '--' ) < 0 && arg !== command . name && arg !== command . alias ) ;
1010
11- const isCommandUsed = commands => commands . find ( cmd => ( cmd . alias ? process . argv . includes ( cmd . name ) || process . argv . includes ( cmd . alias ) : process . argv . includes ( cmd . name ) ) ) ;
11+ const isCommandUsed = commands =>
12+ commands . find ( cmd => {
13+ return process . argv . includes ( cmd . name ) || process . argv . includes ( cmd . alias ) ;
14+ } ) ;
1215
1316async function runCLI ( cli , commandIsUsed ) {
1417 let args ;
15- const helpFlagExists = helpFlagPresent ( process . argv ) ;
18+ const helpFlagExists = isHelpFlagPresent ( process . argv ) ;
1619 if ( helpFlagExists ) {
1720 await cli . runHelp ( ) ;
1821 return ;
You can’t perform that action at this time.
0 commit comments