dotnet/runtime
System.Console.ReadKey fails in MSYS' console mintty
Offen
#49.210 geöffnet am 05.03.2021
area-System.Consolebughelp wantedos-linux
Repository-Metriken
- Stars
- (17.886 Sterne)
- PR-Merge-Metriken
- (Durchschn. Merge 12T 11h) (661 gemergte PRs in 30 T)
Beschreibung
When using System.Console.ReadKey under mintty, the MSYS console, it raises an exception.
Configuration
.NET Core 3.1 Windows 10 x64 MSYS
Regression?
No
Other information
Unhandled exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.InvalidOperationException: Cannot read keys when either application does not have a console or when console input has been redirected. Try Console.Read.
at System.ConsolePal.ReadKey(Boolean intercept)
at System.Console.ReadKey()