refactor(dev-infra): add spawnSync to child process utils, normalize naming of child-process utils (#42394)

Create a `spawnSync` command for common usage, additionally update naming to use `spawn` instead of
`spawnWithDebugOutput`

PR Close #42394
This commit is contained in:
Joey Perrott
2021-06-03 10:54:36 -07:00
committed by Andrew Kushnir
parent e6593ad94a
commit 08444c6679
8 changed files with 147 additions and 79 deletions
+1 -1
View File
@@ -9,7 +9,6 @@
import {spawnSync, SpawnSyncOptions, SpawnSyncReturns} from 'child_process';
import {Options as SemVerOptions, parse, SemVer} from 'semver';
import {spawnWithDebugOutput} from '../child-process';
import {getConfig, GithubConfig, NgDevConfig} from '../config';
import {debug, info} from '../console';
import {DryRunError, isDryRun} from '../dry-run';
@@ -24,6 +23,7 @@ export class GitCommandError extends Error {
// accidentally leak the Github token that might be used in a command,
// we sanitize the command that will be part of the error message.
super(`Command failed: git ${client.sanitizeConsoleOutput(args.join(' '))}`);
Object.setPrototypeOf(this, GitCommandError.prototype);
}
}