Newline-terminate interactive prompts so they are actually displayed#1230
Open
ramonsmits wants to merge 1 commit into
Open
Newline-terminate interactive prompts so they are actually displayed#1230ramonsmits wants to merge 1 commit into
ramonsmits wants to merge 1 commit into
Conversation
Prompts were written with Console.Write, i.e. without a trailing newline. Console.Out auto-flushes, so the bytes do leave the process — but a trailing partial line is not rendered by line-oriented consumers of stdout (PowerShell, CI logs). The prompt is therefore invisible while the tool blocks on the subsequent Console.ReadLine()/ReadKey(), and the tool appears to hang forever with no output and nothing in the event log. Reported by a customer whose run sat "hung" for three days; it was in fact waiting at an "Enter customer name: " prompt they could never see. Terminate the prompts with a newline instead. Affects the customer name prompt, the Y/N confirmation, and the HTTP basic-auth username/password prompts.
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.
Prompts were written with Console.Write, i.e. without a trailing newline. Console.Out auto-flushes, so the bytes do leave the process — but a trailing partial line is not rendered by line-oriented consumers of stdout (PowerShell, CI logs). The prompt is therefore invisible while the tool blocks on the subsequent Console.ReadLine()/ReadKey(), and the tool appears to hang forever with no output and nothing in the event log.
Reported by a customer whose run sat "hung" for three days; it was in fact waiting at an "Enter customer name: " prompt they could never see.
Terminate the prompts with a newline instead. Affects the customer name prompt, the Y/N confirmation, and the HTTP basic-auth username/password prompts.