mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
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:
committed by
Andrew Kushnir
parent
e6593ad94a
commit
08444c6679
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user