Skip to content

fix(core): prevent Nx Console prompt from blocking non-interactive commands#33646

Merged
FrozenPandaz merged 4 commits intomasterfrom
fix/nx-console-prompt-blocking
Nov 28, 2025
Merged

fix(core): prevent Nx Console prompt from blocking non-interactive commands#33646
FrozenPandaz merged 4 commits intomasterfrom
fix/nx-console-prompt-blocking

Conversation

@FrozenPandaz
Copy link
Copy Markdown
Contributor

Current Behavior

The Nx Console installation prompt blocks commands when run in non-interactive contexts such as:

  • CI environments
  • AI agents
  • Piped commands

The prompt only checked process.stdout.isTTY but not process.stdin.isTTY, causing it to wait indefinitely for input that would never arrive.

Expected Behavior

Commands should complete without prompting when run in non-interactive environments.

Related Issue(s)

Fixes #33552

Solution

Updated the check to verify:

  1. Both stdin and stdout are TTY (truly interactive terminal)
  2. Not running in a CI environment (using existing isCI() utility)

This ensures the prompt only appears when the user can actually provide input.

…mmands

The Nx Console installation prompt was blocking commands when run in
non-interactive contexts (CI, AI agents, piped commands). The prompt
only checked `process.stdout.isTTY` but not `process.stdin.isTTY`,
causing it to wait for input that would never arrive.

Now checks:
- Both stdin and stdout are TTY (truly interactive)
- Not running in a CI environment

Fixes #33552
@FrozenPandaz FrozenPandaz requested a review from a team as a code owner November 27, 2025 21:25
@netlify
Copy link
Copy Markdown

netlify Bot commented Nov 27, 2025

Deploy Preview for nx-docs ready!

Name Link
🔨 Latest commit 1bcf745
🔍 Latest deploy log https://app.netlify.com/projects/nx-docs/deploys/6929b36bf787c00008ab9ee4
😎 Deploy Preview https://deploy-preview-33646--nx-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@vercel
Copy link
Copy Markdown

vercel Bot commented Nov 27, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
nx-dev Ready Ready Preview Nov 28, 2025 2:42pm

@nx-cloud
Copy link
Copy Markdown
Contributor

nx-cloud Bot commented Nov 27, 2025

View your CI Pipeline Execution ↗ for commit 1bcf745

Command Status Duration Result
nx affected --targets=lint,test,test-kt,build,e... ✅ Succeeded 5m 4s View ↗
nx run-many -t check-imports check-lock-files c... ✅ Succeeded 2m 47s View ↗
nx-cloud record -- nx-cloud conformance:check ✅ Succeeded 11s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 2s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded <1s View ↗

☁️ Nx Cloud last updated this comment at 2025-11-28 14:45:53 UTC

…mmands

The Nx Console installation prompt was blocking commands when run in
non-interactive contexts (CI, AI agents, piped commands). The prompt
only checked `process.stdout.isTTY` but not `process.stdin.isTTY`,
causing it to wait for input that would never arrive.

Now checks:
- Both stdin and stdout are TTY (truly interactive)
- Not running in a CI environment

Fixes #33552 [Self-Healing CI Rerun]
nx-cloud[bot]

This comment was marked as outdated.

…mmands

The Nx Console installation prompt was blocking commands when run in
non-interactive contexts (CI, AI agents, piped commands). The prompt
only checked `process.stdout.isTTY` but not `process.stdin.isTTY`,
causing it to wait for input that would never arrive.

Now checks:
- Both stdin and stdout are TTY (truly interactive)
- Not running in a CI environment

Fixes #33552 [Self-Healing CI Rerun]
Copy link
Copy Markdown
Contributor

@nx-cloud nx-cloud Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nx Cloud has identified a flaky task in your failed CI:

🔂 Since the failure was identified as flaky, we reran your CI automatically.

Nx Cloud View detailed reasoning in Nx Cloud ↗


🎓 Learn more about Self-Healing CI on nx.dev

@FrozenPandaz FrozenPandaz merged commit 9ffe2fd into master Nov 28, 2025
19 checks passed
@FrozenPandaz FrozenPandaz deleted the fix/nx-console-prompt-blocking branch November 28, 2025 14:53
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Dec 4, 2025

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Dec 4, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Please don't block nx commands with prompts for unrelated functions

2 participants