Skip to content

Commit

Permalink
Fix console on non-user-interactive sessions
Browse files Browse the repository at this point in the history
  • Loading branch information
smoogipoo committed Nov 1, 2024
1 parent 022e6ea commit 219c05c
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,11 @@ await Task.WhenAll(Partitioner.Create(scores).GetPartitions(Threads).Select(asyn

private void handleInput()
{
if (!Console.KeyAvailable) return;
if (!Environment.UserInteractive || Console.IsInputRedirected)
return;

if (!Console.KeyAvailable)
return;

ConsoleKeyInfo key = Console.ReadKey(true);

Expand Down

0 comments on commit 219c05c

Please sign in to comment.