Skip to content

Resizing terminal causes promptSecret to crash #6319

Open
@finleyjb

Description

@finleyjb

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 <anonymous>: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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingupstreamChanges upstream are required to solve these issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions