Skip to content

Commit

Permalink
Merge pull request backstage#301 from spotify/rugvip/shell
Browse files Browse the repository at this point in the history
cli: use shell option to fix build issues on windows
  • Loading branch information
Rugvip authored Mar 17, 2020
2 parents e09bf89 + 3772c82 commit fd90d8a
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/cli/src/commands/plugin/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/plugin/lint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/src/commands/plugin/testCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
1 change: 1 addition & 0 deletions packages/cli/src/commands/watch-deps/child.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions packages/cli/src/commands/watch-deps/compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion scripts/cli-e2e-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit fd90d8a

Please sign in to comment.