Repository navigation
fix: stop prompts from asking forever when the input ends - #10658
Open
paulbalandan wants to merge 1 commit into
Open
paulbalandan wants to merge 1 commit into
paulbalandan wants to merge 1 commit into
Conversation
paulbalandan
force-pushed
the
prompt-end-of-input
branch
from
October 25, 2026 12:46
324c2d6 to
92607fd
Compare
paulbalandan
force-pushed
the
prompt-end-of-input
branch
from
October 25, 2026 12:48
92607fd to
463d1d9
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
InputOutput::input()returns''both for an empty line and for the end of the input. So when piped or redirected input runs out before a valid answer, a prompt that asks again loops forever:CLI::prompt()andCLI::promptByKey()whose default fails the validation rulesCLI::promptByMultipleKeys()whose options have string keysFor example,
CLI::prompt('Name', null, 'required') < /dev/nullnever returns.InputOutput::isAtEnd(). It reports whether the lastinput()found the end of an input other than a terminal.input()still returns'', so existing callers see no change.CLIException(newCLI.inputEndedlanguage string) in place of looping.MockInputOutput::isAtEnd()returnstrueonce its scripted answers have run out. A scripted''before the last answer stays an empty line.Checklist: