From a72f0d91002914bdee125566ab83a8ac827b356e Mon Sep 17 00:00:00 2001 From: jamesgeorge007 Date: Thu, 4 Jun 2020 12:36:34 +0530 Subject: [PATCH] feat: validate user input --- packages/webpack-cli/lib/utils/cli-executer.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/webpack-cli/lib/utils/cli-executer.js b/packages/webpack-cli/lib/utils/cli-executer.js index 782beb0472d..9c7511cf7f0 100644 --- a/packages/webpack-cli/lib/utils/cli-executer.js +++ b/packages/webpack-cli/lib/utils/cli-executer.js @@ -37,6 +37,7 @@ async function prompter() { message: `Enter value of the ${selection} flag`, initial: options.defaultValue, result: (value) => [selection, value], + validate: (value) => Boolean(value), }); questions.push(valuePrompt); });