From 30c35abb44bdc6da4c0093f4cd144e8af5313cfb Mon Sep 17 00:00:00 2001 From: Tobias Koppers Date: Thu, 29 Mar 2018 17:06:10 +0200 Subject: [PATCH] use shell mode for windows support --- bin/webpack.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/webpack.js b/bin/webpack.js index 06b098a89d1..9d83f9bef43 100755 --- a/bin/webpack.js +++ b/bin/webpack.js @@ -3,7 +3,8 @@ function runCommand(command, options) { const cp = require("child_process"); return new Promise((resolve, reject) => { const executedCommand = cp.spawn(command, options, { - stdio: "inherit" + stdio: "inherit", + shell: true }); executedCommand.on("error", error => { @@ -43,7 +44,7 @@ if (!webpackCliInstalled) { const commandToBeRun = `${packageManager} ${options.join(" ")}`; - const question = `Would you like to install webpack-cli? (That will run ${commandToBeRun}) `; + const question = `Would you like to install webpack-cli? (That will run ${commandToBeRun}) (yes/NO)`; console.error("The CLI moved into a separate package: webpack-cli"); const questionInterface = readLine.createInterface({