fix(core): write terminal output to cache folder (#22673)

This commit is contained in:
Emily Xiong 2024-04-04 14:30:42 -04:00 committed by GitHub
parent 3b182e4650
commit c51a084eea
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View File

@ -201,6 +201,7 @@ export class ForkedProcessTaskRunner {
private async forkProcessWithPseudoTerminal( private async forkProcessWithPseudoTerminal(
task: Task, task: Task,
{ {
temporaryOutputPath,
streamOutput, streamOutput,
taskGraph, taskGraph,
env, env,
@ -242,7 +243,7 @@ export class ForkedProcessTaskRunner {
if (code >= 128) { if (code >= 128) {
process.exit(code); process.exit(code);
} }
this.writeTerminalOutput(temporaryOutputPath, terminalOutput);
res({ res({
code, code,
terminalOutput, terminalOutput,

View File

@ -1,6 +1,7 @@
import { defaultMaxListeners } from 'events'; import { defaultMaxListeners } from 'events';
import { performance } from 'perf_hooks'; import { performance } from 'perf_hooks';
import { relative } from 'path'; import { relative } from 'path';
import { writeFileSync } from 'fs';
import { TaskHasher } from '../hasher/task-hasher'; import { TaskHasher } from '../hasher/task-hasher';
import runCommandsImpl from '../executors/run-commands/run-commands.impl'; import runCommandsImpl from '../executors/run-commands/run-commands.impl';
import { ForkedProcessTaskRunner } from './forked-process-task-runner'; import { ForkedProcessTaskRunner } from './forked-process-task-runner';
@ -433,7 +434,7 @@ export class TaskOrchestrator {
terminalOutput terminalOutput
); );
} }
writeFileSync(temporaryOutputPath, terminalOutput);
results.push({ results.push({
task, task,
status, status,