fix: keep tool child stdin closed and run tool commands non-interactively - #42778
fix: keep tool child stdin closed and run tool commands non-interactively#42778utk-code wants to merge 2 commits into
Conversation
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
|
The following comment was made by an LLM, it may be inaccurate: Based on my search, I found one potentially related PR: PR #41968: fix(cli): survive broken stdio pipes This PR may be related as it also deals with stdio/pipe handling in child processes, though it focuses on surviving broken pipes rather than closing stdin and preventing interactive prompts. However, the current PR #42778 appears to be a unique fix addressing the specific issue (#42773) where tool commands hang on Windows due to open stdin pipes and interactive prompts. No exact duplicates were found. |
|
This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window. Feel free to open a new pull request that follows our guidelines. |
Issue for this PR
Closes #42773
Type of change
What does this PR do?
On Windows, tool commands that prompt for input on stdin (e.g. npm exec asking "Ok to proceed? (y)") hang — the prompt shows up but nothing typed reaches the process, because the child's stdin is an open pipe nothing closes, and the TUI owns the console input.
Changes:
How did you verify your code works?
Reproduced on Windows: npm exec with an open stdin pipe hangs; with CI=1 or npm_config_yes=true it completes. Checked no tests rely on the old default.
Screenshots / recordings
N/A (not a UI change)
Checklist