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

[web][felt] Fix stdout inheritance for sub-processes #27070

Merged
merged 2 commits into from
Jun 30, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions lib/web_ui/dev/utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,12 @@ Future<ProcessManager> startProcess(
// Running the process in a system shell for Windows. Otherwise
// the process is not able to get Dart from path.
runInShell: io.Platform.isWindows,
mode: io.ProcessStartMode.normal,
// When [evalOutput] is false, we don't need to intercept the stdout of the
// sub-process. In this case, it's better to run the sub-process in the
// `inheritStdio` mode which lets it print directly to the terminal.
// This allows sub-processes such as `ninja` to use all kinds of terminal
// features like printing colors, printing progress on the same line, etc.
mode: evalOutput ? io.ProcessStartMode.normal : io.ProcessStartMode.inheritStdio,
environment: environment,
);
processesToCleanUp.add(process);
Expand Down Expand Up @@ -112,9 +117,6 @@ class ProcessManager {
if (_evalOutput) {
_forwardStream(process.stdout, _stdout);
_forwardStream(process.stderr, _stderr);
} else {
_forwardStream(process.stdout, io.stdout);
_forwardStream(process.stderr, io.stderr);
}
}

Expand Down
1 change: 1 addition & 0 deletions lib/web_ui/dev/watcher.dart
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ class PipelineWatcher {
void _pipelineDone(int pipelineRunCount) {
if (pipelineRunCount == _pipelineRunCount) {
print('*** Done! ***');
print('Press \'q\' to exit felt');
}
}
}