MCPcopy Create free account
hub / github.com/angular/dev-infra / getEnvironmentForNonInteractiveCommand

Function getEnvironmentForNonInteractiveCommand

ng-dev/utils/child-process.ts:170–178  ·  view source on GitHub ↗

* Gets a process environment object with defaults that can be used for * spawning non-interactive child processes. * * Currently we enable `FORCE_COLOR` since non-interactive spawn's with * non-inherited `stdio` will not have colors enabled due to a missing TTY.

(
  userProvidedEnv?: NodeJS.ProcessEnv,
)

Source from the content-addressed store, hash-verified

168 *
169 * For more details see: https://nodejs.org/api/child_process.html#child_process_event_exit
170 */
171function statusFromExitCodeAndSignal(exitCode: number | null, signal: NodeJS.Signals | null) {
172 return exitCode ?? signal ?? -1;
173}
174
175/**
176 * Gets a process environment object with defaults that can be used for
177 * spawning non-interactive child processes.
178 *
179 * Currently we enable `FORCE_COLOR` since non-interactive spawn's with
180 * non-inherited `stdio` will not have colors enabled due to a missing TTY.
181 */

Callers 3

spawnSyncFunction · 0.85
spawnFunction · 0.85
execFunction · 0.85

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected