dotnet/runtime

System.Console.ReadKey fails in MSYS' console mintty

オープン

#49,210 opened on 2021/03/05

 (1 件のコメント) (0 件のリアクション) (0 人の担当者)C# (5,445 件のフォーク)batch import
area-System.Consolebughelp wantedos-linux

Repository metrics

Stars
 (17,886 個のスター)
PR merge metrics
 (平均マージ 12d 11h) (30d で 661 merged PRs)

説明

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()

https://github.com/aaru-dps/Aaru/issues/562

コントリビューターガイド