Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 98e6d15

Browse files
authored
Preserve stdout colors of subprocesses run by felt (#13209)
1 parent 6d0f075 commit 98e6d15

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

lib/web_ui/dev/test_runner.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,6 @@ class TestCommand extends Command<bool> {
230230
@required bool expectFailure,
231231
}) async {
232232
final List<String> testArgs = <String>[
233-
'--no-color',
234233
...<String>['-r', 'compact'],
235234
'--concurrency=$concurrency',
236235
if (isDebug) '--pause-after-load',

lib/web_ui/dev/utils.dart

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,9 @@ Future<int> runProcess(
4343
executable,
4444
arguments,
4545
workingDirectory: workingDirectory,
46+
mode: io.ProcessStartMode.inheritStdio,
4647
);
47-
final int exitCode = await _forwardIOAndWait(process);
48+
final int exitCode = await process.exitCode;
4849
if (mustSucceed && exitCode != 0) {
4950
throw ProcessException(
5051
description: 'Sub-process failed.',
@@ -82,16 +83,6 @@ Future<String> evalProcess(
8283
return result.stdout;
8384
}
8485

85-
Future<int> _forwardIOAndWait(io.Process process) {
86-
final StreamSubscription stdoutSub = process.stdout.listen(io.stdout.add);
87-
final StreamSubscription stderrSub = process.stderr.listen(io.stderr.add);
88-
return process.exitCode.then<int>((int exitCode) {
89-
stdoutSub.cancel();
90-
stderrSub.cancel();
91-
return exitCode;
92-
});
93-
}
94-
9586
@immutable
9687
class ProcessException implements Exception {
9788
ProcessException({

0 commit comments

Comments
 (0)