Announce when the tool is waiting for interactive input#1226
Closed
ramonsmits wants to merge 1 commit into
Closed
Conversation
The tool blocks on Console.ReadLine/ReadKey for the customer name, the "Do you wish to proceed?" confirmation, and HTTP (RabbitMQ) credentials. On a seemingly-frozen console this is easily mistaken for a hang - especially the customer-name prompt, which is the first thing after the version check and is where support case 00106424's run appeared to stall. Add Out.WriteAwaitingInput(...) to print a clear, highlighted notice at each blocking prompt, and point users at --customerName / --unattended so they can avoid the customer-name prompt entirely in automated or locked-down environments.
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.
Problem
The tool blocks on
Console.ReadLine/Console.ReadKeyat three interactive points:BaseCommand), when--customerNameisn't supplied;Out.Confirm), when--unattendedisn't supplied;InteractiveHttpAuth).On a seemingly-frozen console this is easily mistaken for a hang. The customer-name prompt is the first interactive point after the version check, so a run that's simply waiting for a name looks identical to one that's stuck. This came up in support case 00106424, where the console output ended right at that prompt and the tool was reported as "hanging indefinitely".
Change
Add
Out.WriteAwaitingInput(string message)— a highlighted (cyan) notice printed immediately before each blocking prompt — and call it at the three sites above. The customer-name message also points at the flags that avoid the prompt in automated/locked-down environments (--customerName,--unattended).No behavior change beyond the extra notice; prompts and reads are unchanged.
Before / after (customer-name prompt)
Before — silent after the version line, then blocks:
After:
With
--customerName "..." --unattended, no prompt (and no notice) is shown, as before.Verification
dotnet build -c Release— 0 warnings, 0 errors (warnings-as-errors + analyzers).--customerName/--unattendedand confirmed the notice appears only when a prompt will actually block.