Skip to content

Commit

Permalink
Show help on unrecognized command
Browse files Browse the repository at this point in the history
  • Loading branch information
mstruebing committed Mar 20, 2019
1 parent ea15b99 commit 3b595fd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,10 @@ program.command("component-view <Name>").action(addComponentView);
program.command("component-types <Name>").action(addComponentTypes);
program.command("component-update <Name>").action(addComponentUpdate);

program.on('command:*', () => {
console.error('ERROR: unrecognized command');
program.outputHelp();
process.exit(1);
});

program.parse(process.argv);

0 comments on commit 3b595fd

Please sign in to comment.