spectre.console
spectre.console copied to clipboard
`Git bash` terminal incompatibility with AnsiConsole.Prompt
Information
- OS:
Windows 10
- Version:
10.0.19044.2251
- Terminal:
git bash
Describe the bug
When using git bash
(coming with Git For Windows) as a terminal, using AnsiConsole.Prompt
will throw the following System.InvalidOperationException
:
Error: Cannot see if a key has been pressed when either application does not have a console
or when console input has been redirected from a file.
Try Console.In.Peek.
To Reproduce
Any AnsiConsole.Prompt
call from any application running from git bash
should repro from my understanding, but the issue was first discovered here:
https://github.com/sailro/EscapeFromTarkov-Trainer/issues/263
Reproduced here:
From the following code line: https://github.com/sailro/EscapeFromTarkov-Trainer/blob/master/Installer/Installation.cs#L80
Expected behavior Ideally it should work as for other terminals.
Additional context
Note: git bash
is using MINGW
.
Please upvote :+1: this issue if you are interested in it.