Skip to content

Commit 16ba3ad

Browse files
AgentEnderFrozenPandaz
authored andcommitted
fix(core): ensure no tui on single tasks (#33910)
## Current Behavior The tui shouldn't show for single tasks ## Expected Behavior The tui isn't shown for single tasks ## Related Issue(s) <!-- Please link the issue being fixed so it gets closed when this is merged. --> Fixes #
1 parent 54ce286 commit 16ba3ad

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

packages/nx/src/tasks-runner/is-tui-enabled.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import { NxArgs } from '../utils/command-line-utils';
44
import { isCI } from '../utils/is-ci';
55
import { logger } from '../utils/logger';
66

7+
export const ORIGINAL_TUI_ENV_VALUE = process.env.NX_TUI;
8+
79
/**
810
* @returns If tui is enabled
911
*/

packages/nx/src/tasks-runner/run-command.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import {
4040
} from '../utils/sync-generators';
4141
import { workspaceRoot } from '../utils/workspace-root';
4242
import { createTaskGraph } from './create-task-graph';
43-
import { isTuiEnabled } from './is-tui-enabled';
43+
import { isTuiEnabled, ORIGINAL_TUI_ENV_VALUE } from './is-tui-enabled';
4444
import {
4545
CompositeLifeCycle,
4646
LifeCycle,
@@ -94,8 +94,8 @@ async function getTerminalOutputLifeCycle(
9494

9595
const isRunOne = initiatingProject != null;
9696

97-
if (tasks.length === 1) {
98-
process.env.NX_TUI ??= 'false';
97+
if (tasks.length === 1 && !ORIGINAL_TUI_ENV_VALUE) {
98+
process.env.NX_TUI = 'false';
9999
}
100100

101101
if (isTuiEnabled()) {

0 commit comments

Comments
 (0)