Skip to content

Commit 4184da5

Browse files
Change fix for windows (do not use shell)
1 parent a7b6c98 commit 4184da5

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

apps/demos/utils/create-bundles/Angular/bundler.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ export default class AngularBundler implements Bundler {
4242

4343
createDemoLayout(demo, this.framework);
4444

45-
const ngBuildProcess = spawn('npm', ['run', 'build-angular', '--', getProjectNameByDemo(demo)], { shell: process.platform === 'win32' });
45+
const npmExecutable = process.platform === 'win32' ? 'npm.cmd' : 'npm';
46+
const ngBuildProcess = spawn(npmExecutable, ['run', 'build-angular', '--', getProjectNameByDemo(demo)], { shell: false });
4647
ngBuildProcess.stdout.on('data', (data) => {
4748
console.log(`stdout: ${data}`);
4849
});

apps/demos/utils/ts-to-js-converter/converter.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ const pipeSource = async (
7979
};
8080

8181
const execTsc = async (directory: string, args: string[]): Promise<string> => new Promise((resolve, reject) => {
82-
const proc = cps.spawn('tsc', args, { cwd: directory, shell: isWindows() });
82+
const tscExecutable = isWindows() ? 'tsc.cmd' : 'tsc';
83+
const proc = cps.spawn(tscExecutable, args, { cwd: directory, shell: false });
8384
let stdout = '';
8485
let stderr = '';
8586
proc.stdout.on('data', (data: Buffer) => { stdout += data.toString(); });

0 commit comments

Comments
 (0)