ignore exceptions from stdin.lineMode (#7439)

* ignore exceptions from stdin.lineMode

* only catch IOException
This commit is contained in:
Devon Carew 2017-01-11 10:54:42 -08:00 committed by GitHub
parent 5a9063f55c
commit 7f2915d331

View File

@ -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.