`IConsole.ReadKey` should return the key that was read
OronDF343 opened this issue · 1 comments
OronDF343 commented
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, 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
.
Tyrrrz commented
Ugh, ReadKey()
should really return something. Not sure why it was defined as void
. I think this may have been a mistake.