diff --git a/dev/bots/run_command.dart b/dev/bots/run_command.dart index de6743c16a..8cf8322ed4 100644 --- a/dev/bots/run_command.dart +++ b/dev/bots/run_command.dart @@ -55,7 +55,7 @@ Stream runAndGetStdout(String executable, List arguments, { await for (String line in lines) { yield line; } - await stderr.addStream(process.stderr); + final int exitCode = await process.exitCode.timeout(timeout, onTimeout: () { stderr.writeln('Process timed out after $timeout'); return expectNonZeroExit ? 0 : 1;