From e641fe5ec7458602f770204aaa4a49385c914637 Mon Sep 17 00:00:00 2001 From: Doug Parker Date: Tue, 5 Nov 2019 11:56:36 -0800 Subject: [PATCH] fix(@angular-devkit/benchmark): Allows the CLI repo to be hosted in a directory with spaces. 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. --- packages/angular_devkit/benchmark/src/monitored-process.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular_devkit/benchmark/src/monitored-process.ts b/packages/angular_devkit/benchmark/src/monitored-process.ts index 885736121e43..4a45fdff6a8c 100644 --- a/packages/angular_devkit/benchmark/src/monitored-process.ts +++ b/packages/angular_devkit/benchmark/src/monitored-process.ts @@ -37,7 +37,7 @@ export class LocalMonitoredProcess implements MonitoredProcess { run(): Observable { 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);