Skip to content

v0.3.2 — the merge prompt actually waits

Choose a tag to compare

@waazy-w waazy-w released this 21 Aug 15:49
· 44 commits to main since this release

Fixed

  • The end-of-recovery prompt never waited for an answer. It read from process.stdin, but
    the recovery session is a long-lived child that takes the controlling terminal, and once
    it exits the inherited stdin no longer delivers a line -- readline saw end-of-input and
    closed, so the question printed and vanished and the keystroke landed in the shell
    instead. The prompt now reads from /dev/tty, a fresh handle on the same terminal that
    is unaffected by whatever the child did, falling back to process.stdin on Windows and
    where there is no controlling terminal. Whether to prompt at all is still decided by
    process.stdin.isTTY, so a piped stdin in a script or CI still gets no prompt even
    though /dev/tty would supply one.
  • The terminal is opened as a tty.ReadStream rather than a plain file stream, so readline
    can turn off the driver's own echo. Without setRawMode both echoed and every keystroke
    appeared twice.