Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): do not stream output when static output style is enabled #27642

Merged
merged 1 commit into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/nx/src/tasks-runner/default-tasks-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ async function runAllTasks(
context.taskGraph,
options,
context.nxArgs?.nxBail,
context.daemon
context.daemon,
context.nxArgs?.outputStyle
);

return orchestrator.run();
Expand Down
8 changes: 6 additions & 2 deletions packages/nx/src/tasks-runner/task-orchestrator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ export class TaskOrchestrator {
private readonly taskGraph: TaskGraph,
private readonly options: DefaultTasksRunnerOptions,
private readonly bail: boolean,
private readonly daemon: DaemonClient
private readonly daemon: DaemonClient,
private readonly outputStyle: string
) {}

async run() {
Expand Down Expand Up @@ -360,7 +361,10 @@ export class TaskOrchestrator {
const pipeOutput = await this.pipeOutputCapture(task);
// obtain metadata
const temporaryOutputPath = this.cache.temporaryOutputPath(task);
const streamOutput = shouldStreamOutput(task, this.initiatingProject);
const streamOutput =
this.outputStyle === 'static'
? false
: shouldStreamOutput(task, this.initiatingProject);

let env = pipeOutput
? getEnvVariablesForTask(
Expand Down