Skip to content

Commit

Permalink
fix(core): write terminal output to cache folder (#22673)
Browse files Browse the repository at this point in the history
(cherry picked from commit c51a084)
  • Loading branch information
xiongemi authored and FrozenPandaz committed Apr 5, 2024
1 parent 6a143b4 commit 7132551
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion packages/nx/src/tasks-runner/forked-process-task-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ export class ForkedProcessTaskRunner {
private async forkProcessWithPseudoTerminal(
task: Task,
{
temporaryOutputPath,
streamOutput,
taskGraph,
env,
Expand Down Expand Up @@ -242,7 +243,7 @@ export class ForkedProcessTaskRunner {
if (code >= 128) {
process.exit(code);
}

this.writeTerminalOutput(temporaryOutputPath, terminalOutput);
res({
code,
terminalOutput,
Expand Down
3 changes: 2 additions & 1 deletion packages/nx/src/tasks-runner/task-orchestrator.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { defaultMaxListeners } from 'events';
import { performance } from 'perf_hooks';
import { relative } from 'path';
import { writeFileSync } from 'fs';
import { TaskHasher } from '../hasher/task-hasher';
import runCommandsImpl from '../executors/run-commands/run-commands.impl';
import { ForkedProcessTaskRunner } from './forked-process-task-runner';
Expand Down Expand Up @@ -433,7 +434,7 @@ export class TaskOrchestrator {
terminalOutput
);
}

writeFileSync(temporaryOutputPath, terminalOutput);
results.push({
task,
status,
Expand Down

0 comments on commit 7132551

Please sign in to comment.