Skip to content

Commit 217eb29

Browse files
dgp1130mgechev
authored andcommitted
fix(@angular-devkit/benchmark): Allows the CLI repo to be hosted in a directory with spaces. (angular#16073)
child_process.spawn() with `shell: true` does not quote its arguments, so any data passed in must be surrounded by quotes to properly include spaces. This was making tests fail when the repository is checked out to a directory with a space in it. Easiest solution is to simply not use shell escaping which avoids the whole problem.
1 parent 56a70bc commit 217eb29

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/angular_devkit/benchmark/src/monitored-process.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export class LocalMonitoredProcess implements MonitoredProcess {
3737
run(): Observable<number> {
3838
return new Observable(obs => {
3939
const { cmd, cwd, args } = this.command;
40-
const spawnOptions: SpawnOptions = { cwd: cwd, shell: true };
40+
const spawnOptions: SpawnOptions = { cwd };
4141

4242
// Spawn the process.
4343
const childProcess = spawn(cmd, args, spawnOptions);

0 commit comments

Comments
 (0)