mirror of
https://github.com/cheat/cheat.git
synced 2026-03-07 03:03:32 +01:00
fix: avoid stdin buffering bug in installer prompts
Prompt() created a new bufio.NewReader(os.Stdin) on each call, which buffered all piped input on the first call and left nothing for subsequent prompts. This made cheat un-scriptable (e.g., piping answers via printf). Fix by reading one byte at a time from os.Stdin directly. Also adds an end-to-end integration test for the first-run experience (regression test for #721, #771, #730) and bumps the Dockerfile to Go 1.26. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# NB: this image isn't used anywhere in the build pipeline. It exists to
|
||||
# conveniently facilitate ad-hoc experimentation in a sandboxed environment
|
||||
# during development.
|
||||
FROM golang:1.15-alpine
|
||||
FROM golang:1.26-alpine
|
||||
|
||||
RUN apk add git less make
|
||||
|
||||
|
||||
Reference in New Issue
Block a user