Skip to content

Commit 4df2d98

Browse files
committed
show help and recommend when the command is wrong
1 parent 213ab49 commit 4df2d98

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/gatsby-cli/src/create-cli.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,8 @@ module.exports = (argv, handlers) => {
191191
})
192192
.wrap(cli.terminalWidth())
193193
.demandCommand(1, `Pass --help to see all available commands and options.`)
194-
.showHelpOnFail(true, `A command is required.`)
194+
.strict()
195+
.showHelpOnFail(true)
196+
.recommendCommands()
195197
.parse(argv.slice(2))
196198
}

0 commit comments

Comments
 (0)