Commit 7f2915d3 authored by Devon Carew's avatar Devon Carew Committed by GitHub

ignore exceptions from stdin.lineMode (#7439)

* ignore exceptions from stdin.lineMode

* only catch IOException
parent 5a9063f5
......@@ -221,7 +221,11 @@ class AnsiTerminal {
String clearScreen() => supportsColor ? _clear : '\n\n';
set singleCharMode(bool value) {
try {
stdin.lineMode = !value;
} on IOException {
// This can throw for some terminals; we ignore the error.
}
}
/// Return keystrokes from the console.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment