crytic / crytic/crytic-compile
Console prompts hang test framework invocation
- Dominant language
- Python
- Stars
- 197
- Forks
- 97
- PR merge metrics
- No merged PRs in 30d
Description
When installing `crytic-compile` on a new machine with `hardhat`, then attempting to compile a codebase, `crytic-compile` executes a command, and captures its output to reflect after the command finishes executing. The problem with this is, on first use of hardhat, you will get a stdin prompt asking you to confirm some settings:
```
xenomega@ubuntu:~/github/audit-treehouse-contracts$ npx hardhat compile
✔ Help us improve Hardhat with anonymous crash reports & basic usage data? (Y/n) ·
```
This will result in crytic-compile waiting for the command to end, but it will not end until the prompt is answered, but stdin/stdout is not forwarded _during_ execution, meaning the user can't see or know there is a prompt to accept.
It's not a big deal in essence, you can run `npx hardhat compile` and see the prompt, answer it, and all future runs will work. But it might be worth forwarding stdin/stdout during execution so users don't hit this issue with any tools that have a prompt in the future.
Contributor guide
Research direction
Reproduce the hang by invoking crytic-compile on a project whose first `npx hardhat compile` asks the anonymous crash-report prompt. Start from the command execution path and observe how stdin and stdout are handled while the process runs. Done means interactive prompts are visible and answerable during execution, without preventing captured output afterward.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100