Resizing terminal causes promptSecret to crash
- Dominant language
- TypeScript
- Stars
- 3.6k
- Forks
- 681
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
`promptSecret` appears to crash if I resize my terminal
**Steps to Reproduce**
1. Open deno repl
2. Run ` import { promptSecret } from "jsr:@std/cli"; promptSecret();`
3. See the secret prompt
4. Resize your terminal window
This gives the following error:
```
Uncaught Interrupted: Interrupted system call (os error 4)
at readSync (ext:deno_io/12_io.js:37:22)
at Stdin.readSync (ext:deno_io/12_io.js:138:12)
at readLineFromStdinSync (file:///home/fin/src/std/cli/prompt_secret.ts:85:21)
at promptSecret (file:///home/fin/src/std/cli/prompt_secret.ts:65:12)
at :1:22
```
**Expected behavior**
The `promptSecret` function should continue to run without throwing an error
**Environment**
This is running in the Tabby command-line app accessing Deno in a WSL Debian environment. I have not verified it in any other environments, so it might be a quirk due to this specific setup.
- OS: Windows 11 24h2, Debian 12
- deno version: 2.1.4
- std version: @std/cli v1.0.9
Contributor guide
Assessment
This issue has not been assessed yet.