From 4753d58c0ba929f56fadcd47150d9fa9d6007e41 Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Mon, 12 Aug 2019 11:03:36 +0300 Subject: [PATCH] Display an error on unknown command --- src/command-line/index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/command-line/index.js b/src/command-line/index.js index d91abcc2..e1b4f2b5 100644 --- a/src/command-line/index.js +++ b/src/command-line/index.js @@ -15,6 +15,12 @@ program "override entries of the configuration file, must be specified for each entry that needs to be overriden", Utils.parseConfigOptions ) + .on("command:*", () => { + log.error( + `Unknown command. See ${colors.bold("--help")} for a list of available commands.` + ); + process.exit(1); + }) .on("--help", Utils.extraHelp); // Parse options from `argv` returning `argv` void of these options.