Skip to content

Commit

Permalink
fix(cli): use help command when none is passed
Browse files Browse the repository at this point in the history
  • Loading branch information
exreplay committed Jun 8, 2019
1 parent 1f3f868 commit aaf428c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/cli/lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ export default class Usage {
}

async run() {
const executedCommand = this.argv._[0] || 'help';
for (const command of this.availableCommands) {
if (this.argv._.indexOf(command.name) !== -1) {
if (executedCommand === command.name) {
try {
await command.run();
} catch (err) {
Expand Down

0 comments on commit aaf428c

Please sign in to comment.