use shell mode for windows support

This commit is contained in:
Tobias Koppers 2018-03-29 17:06:10 +02:00
parent e3bb8c9c8f
commit 30c35abb44
1 changed files with 3 additions and 2 deletions

View File

@ -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({