Skip to content

Commit

Permalink
Show help on command fails
Browse files Browse the repository at this point in the history
  • Loading branch information
jcs090218 committed Mar 17, 2022
1 parent b67bd99 commit cf17c08
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions eask
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,14 @@ const yargs = require("yargs");
yargs
.usage("eask <command> [args]")
.commandDir("cmds")
.showHelpOnFail(true)
.help(
'help',
'Show usage instructions.'
)
.command({
command: '*',
handler() { yargs.showHelp(); console.log('\n'); }
})
.demandCommand()
.help().argv;

0 comments on commit cf17c08

Please sign in to comment.