ignore exceptions from stdin.lineMode (#7439)
* ignore exceptions from stdin.lineMode * only catch IOException
This commit is contained in:
@@ -221,7 +221,11 @@ class AnsiTerminal {
|
||||
String clearScreen() => supportsColor ? _clear : '\n\n';
|
||||
|
||||
set singleCharMode(bool value) {
|
||||
stdin.lineMode = !value;
|
||||
try {
|
||||
stdin.lineMode = !value;
|
||||
} on IOException {
|
||||
// This can throw for some terminals; we ignore the error.
|
||||
}
|
||||
}
|
||||
|
||||
/// Return keystrokes from the console.
|
||||
|
||||
Reference in New Issue
Block a user