[tool] Fix stdin.flush calls on processes started by FakeProcessManager (#151183)

Fixes https://github.com/flutter/flutter/issues/151151
This commit is contained in:
Andrew Kolos
2024-07-02 13:40:06 -07:00
committed by GitHub
parent 4cb6d38492
commit 8acf86d995
2 changed files with 14 additions and 2 deletions

View File

@@ -160,8 +160,13 @@ class FakeProcess implements io.Process {
}
return exitCode;
}),
_stderr = stderr,
stdin = stdin ?? IOSink(StreamController<List<int>>().sink),
_stderr = stderr,
stdin = stdin ??
IOSink(
StreamController<List<int>>()
..stream.listen((_) {})
..sink,
),
_stdout = stdout,
_completer = completer
{