cli: use shell option to fix build issues on windows
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user