cli: use shell option to fix build issues on windows

This commit is contained in:
Patrik Oldsberg
2020-03-17 20:40:48 +01:00
parent e09bf890c2
commit 3772c82beb
6 changed files with 6 additions and 4 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ export default async (cmd: Command) => {
try {
await copyStaticAssets();
const result = spawnSync('tsc', args, { stdio: 'inherit' });
const result = spawnSync('tsc', args, { stdio: 'inherit', shell: true });
if (result.error) {
throw result.error;
}
+1 -1
View File
@@ -25,7 +25,7 @@ export default async (cmd: Command) => {
}
try {
const result = spawnSync('web-scripts', args, { stdio: 'inherit' });
const result = spawnSync('web-scripts', args, { stdio: 'inherit', shell: true });
if (result.error) {
throw result.error;
}
@@ -29,7 +29,7 @@ export default async (cmd: Command) => {
}
try {
const result = spawnSync('web-scripts', args, { stdio: 'inherit' });
const result = spawnSync('web-scripts', args, { stdio: 'inherit', shell: true });
if (result.error) {
throw result.error;
}
@@ -23,6 +23,7 @@ export function startChild(args: string[]) {
const child = spawn(command, commandArgs, {
env: { FORCE_COLOR: 'true', ...process.env },
stdio: ['inherit', 'pipe', 'pipe'],
shell: true,
});
// We need to avoid clearing the terminal, or the build feedback of dependencies will be lost
@@ -31,6 +31,7 @@ export function startCompiler(pkg: Package, log: Logger) {
cwd: pkg.location,
env: { FORCE_COLOR: 'true', ...process.env },
stdio: 'pipe',
shell: true,
});
watch.stdin.end();
+1 -1
View File
@@ -68,7 +68,7 @@ function spawnPiped(cmd, options) {
};
}
const child = spawn(cmd[0], cmd.slice(1), { stdio: 'pipe', ...options });
const child = spawn(cmd[0], cmd.slice(1), { stdio: 'pipe', shell: true, ...options });
child.on('error', handleError);
child.on('exit', code => {
if (code) {