Skip to main content
← Back to list
01Issue
BugClosedSwamp CLI
AssigneesNone

Relationships

#1281 promptChoice infinite-loops on non-interactive stdin

Opened by stack72 · 7/19/2026

What happens

promptChoice in src/cli/prompt_helpers.ts has an infinite while (true) loop that calls promptLine on each iteration. When stdin is not a terminal and the piped input is non-empty invalid input (not a valid choice number), the loop retries forever with no TTY check.

This is the promptChoice companion to swamp-club#1279, which fixed promptConfirmation to detect non-interactive stdin and throw a clear error.

Suggested fix

Apply the same [HOST-1]() check from the promptConfirmation fix to promptChoice — throw a UserError when stdin is not a terminal.

Environment

Same as swamp-club#1279.

02Bog Flow
OPENTRIAGEDIN PROGRESSCLOSED

Closed

7/19/2026, 9:43:05 PM

No activity in this phase yet.

03Sludge Pulse

Sign in to post a ripple.