Skip to content

Commit

Permalink
show help and recommend when the command is wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
cricrio committed Jan 23, 2018
1 parent 213ab49 commit 4df2d98
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/gatsby-cli/src/create-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ module.exports = (argv, handlers) => {
})
.wrap(cli.terminalWidth())
.demandCommand(1, `Pass --help to see all available commands and options.`)
.showHelpOnFail(true, `A command is required.`)
.strict()
.showHelpOnFail(true)
.recommendCommands()
.parse(argv.slice(2))
}

0 comments on commit 4df2d98

Please sign in to comment.