Skip to content

Commit

Permalink
[script] use dart:io support for forwarding stdout/stderr (#5410)
Browse files Browse the repository at this point in the history
  • Loading branch information
kevmoo authored Nov 16, 2023
1 parent 7eb9fef commit 07b4b29
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions script/tool/lib/src/common/process_runner.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,9 @@ class ProcessRunner {
print(
'Running command: "$executable ${args.join(' ')}" in ${workingDir?.path ?? io.Directory.current.path}');
final io.Process process = await io.Process.start(executable, args,
workingDirectory: workingDir?.path, environment: environment);
await Future.wait(<Future<dynamic>>[
io.stdout.addStream(process.stdout),
io.stderr.addStream(process.stderr),
]);
workingDirectory: workingDir?.path,
environment: environment,
mode: io.ProcessStartMode.inheritStdio);
if (exitOnError && await process.exitCode != 0) {
final String error =
_getErrorString(executable, args, workingDir: workingDir);
Expand Down

0 comments on commit 07b4b29

Please sign in to comment.