Skip to content

Commit

Permalink
fix(@angular-devkit/benchmark): Allows the CLI repo to be hosted in a…
Browse files Browse the repository at this point in the history
… directory with spaces. (#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.
  • Loading branch information
dgp1130 authored and mgechev committed Nov 8, 2019
1 parent 972c4a0 commit 72802ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/angular_devkit/benchmark/src/monitored-process.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class LocalMonitoredProcess implements MonitoredProcess {
run(): Observable<number> {
return new Observable(obs => {
const { cmd, cwd, args } = this.command;
const spawnOptions: SpawnOptions = { cwd: cwd, shell: true };
const spawnOptions: SpawnOptions = { cwd };

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

0 comments on commit 72802ed

Please sign in to comment.