MCPcopy Index your code
hub / github.com/angular/angular-cli / execAndCaptureError

Function execAndCaptureError

tests/e2e/utils/process.ts:312–327  ·  view source on GitHub ↗
(
  cmd: string,
  args: string[],
  env?: NodeJS.ProcessEnv,
  stdin?: string,
)

Source from the content-addressed store, hash-verified

310}
311
312export async function execAndCaptureError(
313 cmd: string,
314 args: string[],
315 env?: NodeJS.ProcessEnv,
316 stdin?: string,
317): Promise<Error> {
318 try {
319 await _exec({ env, stdin }, cmd, args);
320 throw new Error('Tried to capture subprocess exception, but it completed successfully.');
321 } catch (err) {
322 if (err instanceof Error) {
323 return err;
324 }
325 throw new Error('Subprocess exception was not an Error instance');
326 }
327}
328
329export async function execAndWaitForOutputToMatch(
330 cmd: string,

Callers 6

completion.tsFile · 0.90
windowsTestsFunction · 0.90
registry-option.tsFile · 0.90

Calls 1

_execFunction · 0.85

Tested by

no test coverage detected