dotnet / msbuild

The Microsoft Build Engine (MSBuild) is the build platform for .NET and Visual Studio.
https://docs.microsoft.com/visualstudio/msbuild/msbuild
MIT License
5.23k stars 1.35k forks source link

[Bug]: Disable echoing input to terminal when Terminal Logger is enabled #9034

Closed ladipro closed 5 days ago

ladipro commented 1 year ago

Issue Description

On certain platforms key presses are by default echo'ed to the terminal even when a program is running. I don't believe this is desirable with /tl as it can break the output in a random way.

Steps to Reproduce

Build with /tl on Linux. Hit keys when the build is running.

Expected Behavior

Except for special commands like Ctrl+C, key presses do nothing.

Actual Behavior

Key presses are echoed to console, breaking and interleaving the output. For example when hitting Enter:

image

Analysis

No response

Versions & Configurations

Reproduces in current main (commit hash 4598629a2493ed6b366ab00d595ecd53a3164b60).

rainersigwald commented 1 year ago

cargo does not do this. Not that that means we shouldn't, necessarily.

KalleOlaviNiemitalo commented 1 year ago

If you change this, I hope the change won't take away the ability to type a new command during the build and have that show up at the shell prompt after the build finishes.

baronfel commented 1 year ago

We may need two implementations here:

References: