From 2bf90aae28b5c662fd27df06f13ce388cb1452ba Mon Sep 17 00:00:00 2001 From: jamesgeorge007 Date: Mon, 17 Feb 2020 22:23:24 +0530 Subject: [PATCH] fix: parse args the native way --- lib/cli/src/generate.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/cli/src/generate.js b/lib/cli/src/generate.js index 0ef6cfaffd0c..97464a9d8851 100644 --- a/lib/cli/src/generate.js +++ b/lib/cli/src/generate.js @@ -73,7 +73,8 @@ if (process.argv[1].includes('getstorybook')) { }); }); - program.command('*', { noHelp: true }).action(invalidCmd => { + program.command('*', { noHelp: true }).action(() => { + const [, , invalidCmd] = process.argv; logger.error( ' Invalid command: %s.\n See --help for a list of available commands.', invalidCmd