File tree Expand file tree Collapse file tree 3 files changed +4
-5
lines changed
Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,9 @@ const sortBy = cli.flags.sort;
2525 // Init.
2626 init ( ) ;
2727 const [ country ] = cli . input ;
28+ if ( country === 'help' ) {
29+ cli . showHelp ( 0 ) ;
30+ }
2831
2932 // Table
3033 const head = xcolor ? single : colored ;
Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ corona china
6565corona usa
6666
6767# Display the help data.
68+ corona help
6869corona --help
6970```
7071
Original file line number Diff line number Diff line change @@ -7,11 +7,6 @@ const green = chalk.green;
77
88module . exports = async ( spinner , table , country ) => {
99 if ( country ) {
10- if ( country === 'help' ) {
11- spinner . stopAndPersist ( ) ;
12- console . log ( `${ red ( `${ logSymbols . error } Nops. For help run "${ green ( `corona --help` ) } " command` ) } \n` ) ;
13- process . exit ( 1 ) ;
14- }
1510 const api = await axios . get ( `https://corona.lmao.ninja/countries/${ country } ` ) ;
1611 if ( api . data === 'Country not found' ) {
1712 spinner . stopAndPersist ( ) ;
You can’t perform that action at this time.
0 commit comments