I'm trying to implement a prompt when the output file already exists, asking the user if they want to overwrite it (of course, I'm adding a -y option to disable this prompt).
Normally, I'd implement this with Console.ReadKey(false). However, the ReadKey method in CliFx does not return the key that was read.
Looking at the code, the issue that I can see with adding this feature is that FakeConsole will probably not behave consistently with SystemConsole.
Details
I'm trying to implement a prompt when the output file already exists, asking the user if they want to overwrite it (of course, I'm adding a -y option to disable this prompt).
Normally, I'd implement this with
Console.ReadKey(false)
. However, theReadKey
method in CliFx does not return the key that was read.Looking at the code, the issue that I can see with adding this feature is that
FakeConsole
will probably not behave consistently withSystemConsole
.