devicelab benchmarks run on Windows (#8814)
* devicelab benchmarks run on Windows * fix analyzer issue * fix test * fix pubspec
This commit is contained in:
committed by
GitHub
parent
4c91b6e725
commit
d87f19817f
@@ -267,6 +267,7 @@ class AnsiTerminal {
|
||||
static const int _ENOTTY = 25;
|
||||
static const int _ENETRESET = 102;
|
||||
static const int _ERROR_INVALID_PARAMETER = 87;
|
||||
static const int _INVALID_HANDLE = 6;
|
||||
|
||||
/// Setting the line mode can throw for some terminals (with "Operation not
|
||||
/// supported on socket"), but the error can be safely ignored.
|
||||
@@ -275,6 +276,7 @@ class AnsiTerminal {
|
||||
_ENOTTY,
|
||||
_ENETRESET,
|
||||
_ERROR_INVALID_PARAMETER, // TODO(goderbauer): remove when https://github.com/dart-lang/sdk/issues/28599 is fixed
|
||||
_INVALID_HANDLE,
|
||||
];
|
||||
|
||||
bool supportsColor;
|
||||
@@ -284,6 +286,9 @@ class AnsiTerminal {
|
||||
String clearScreen() => supportsColor ? _clear : '\n\n';
|
||||
|
||||
set singleCharMode(bool value) {
|
||||
// TODO(goderbauer): instead of trying to set lineMode and then catching [_ENOTTY] or [_INVALID_HANDLE],
|
||||
// we should check beforehand if stdin is connected to a terminal or not
|
||||
// (requires https://github.com/dart-lang/sdk/issues/29083 to be resolved).
|
||||
try {
|
||||
stdin.lineMode = !value;
|
||||
} on StdinException catch (error) {
|
||||
|
||||
@@ -21,7 +21,7 @@ dependencies:
|
||||
meta: ^1.0.4
|
||||
mustache: ^0.2.5
|
||||
package_config: '>=0.1.5 <2.0.0'
|
||||
platform: 1.0.1
|
||||
platform: 1.0.2
|
||||
process: 2.0.1
|
||||
stack_trace: ^1.4.0
|
||||
usage: ^3.0.0+1
|
||||
|
||||
Reference in New Issue
Block a user