From 4df2d986014c428de74f79fe370d4f8250d78e2f Mon Sep 17 00:00:00 2001 From: Christopher Bellanger Date: Tue, 23 Jan 2018 21:03:30 +0100 Subject: [PATCH] show help and recommend when the command is wrong --- packages/gatsby-cli/src/create-cli.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/gatsby-cli/src/create-cli.js b/packages/gatsby-cli/src/create-cli.js index 4b9f8a8499b83..d56ae43cc96b7 100644 --- a/packages/gatsby-cli/src/create-cli.js +++ b/packages/gatsby-cli/src/create-cli.js @@ -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)) }