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

Function writeErrorToLogFile

packages/angular/cli/src/utilities/log-file.ts:20–29  ·  view source on GitHub ↗
(error: Error)

Source from the content-addressed store, hash-verified

18 * @returns The path of the generated log file.
19 */
20export function writeErrorToLogFile(error: Error): string {
21 if (!logPath) {
22 const tempDirectory = mkdtempSync(realpathSync(tmpdir()) + '/ng-');
23 logPath = normalize(tempDirectory + '/angular-errors.log');
24 }
25
26 appendFileSync(logPath, '[error] ' + (error.stack || error) + '\n\n');
27
28 return logPath;
29}

Callers 2

index.tsFile · 0.90
executeSchematicFunction · 0.90

Calls 1

normalizeFunction · 0.85

Tested by

no test coverage detected