From c42a8e793dfcd3b3c7c789fa744a8b4849b8358f Mon Sep 17 00:00:00 2001 From: Manvendra Singh Date: Sun, 7 Oct 2018 19:27:39 +0530 Subject: [PATCH] feat: install init as global dep Closes https://github.com/webpack/webpack-cli/issues/564 --- bin/prompt-command.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/prompt-command.js b/bin/prompt-command.js index 71f697c9360..f9a58b4fca5 100644 --- a/bin/prompt-command.js +++ b/bin/prompt-command.js @@ -58,6 +58,10 @@ module.exports = function promptForInstallation(packages, ...args) { options[0] = "add"; } + if (packages === "init") { + options[1] = "-g"; + } + const commandToBeRun = `${packageManager} ${options.join(" ")}`; const question = `Would you like to install ${packages}? (That will run ${commandToBeRun}) (yes/NO)`;