Speculative fix for #29262 (#29273)

* Avoid writing to stderr before process has finished streaming
This commit is contained in:
Dan Field 2019-03-13 12:27:05 -07:00 committed by GitHub
parent 96cb84a18c
commit 53d45258dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -55,7 +55,7 @@ Stream<String> runAndGetStdout(String executable, List<String> arguments, {
await for (String line in lines) { await for (String line in lines) {
yield line; yield line;
} }
await stderr.addStream(process.stderr);
final int exitCode = await process.exitCode.timeout(timeout, onTimeout: () { final int exitCode = await process.exitCode.timeout(timeout, onTimeout: () {
stderr.writeln('Process timed out after $timeout'); stderr.writeln('Process timed out after $timeout');
return expectNonZeroExit ? 0 : 1; return expectNonZeroExit ? 0 : 1;