[BUG] `npx x | y`, when `x` has an install prompt, hangs forever
Open
Nobody has claimed this yet.
Bug
cmd:exec
Priority 2
Release 10.x
Release 7.x
Release 8.x
Release 9.x
- Dominant language
- JavaScript
- Stars
- 10.1k
- Forks
- 4.7k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 19
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
Run npx x | y, for any x where you'd get an install prompt, and any y that receives piped input - echo should be fine.
It will hang forever.
Expected Behavior
It should detect that it's in a pipe, and auto-fail rather than prompting the user for something they can't ever respond to.
Steps To Reproduce
See above.
Environment
- OS: Mac
- Node: 16
- npm: 7.latest
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named. Start by running the reported npx x | y reproduction with an install prompt and trace the npx prompt-handling entry point; done means the command detects piped input and fails instead of waiting for an interactive response.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100