mirror of https://github.com/webpack/webpack.git
use shell mode for windows support
This commit is contained in:
parent
e3bb8c9c8f
commit
30c35abb44
|
@ -3,7 +3,8 @@ function runCommand(command, options) {
|
||||||
const cp = require("child_process");
|
const cp = require("child_process");
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const executedCommand = cp.spawn(command, options, {
|
const executedCommand = cp.spawn(command, options, {
|
||||||
stdio: "inherit"
|
stdio: "inherit",
|
||||||
|
shell: true
|
||||||
});
|
});
|
||||||
|
|
||||||
executedCommand.on("error", error => {
|
executedCommand.on("error", error => {
|
||||||
|
@ -43,7 +44,7 @@ if (!webpackCliInstalled) {
|
||||||
|
|
||||||
const commandToBeRun = `${packageManager} ${options.join(" ")}`;
|
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");
|
console.error("The CLI moved into a separate package: webpack-cli");
|
||||||
const questionInterface = readLine.createInterface({
|
const questionInterface = readLine.createInterface({
|
||||||
|
|
Loading…
Reference in New Issue