Skip to content

Commit e97770b

Browse files
committed
fix: Revert interactive/stream change.
1 parent 485fc7d commit e97770b

File tree

3 files changed

+21
-4
lines changed

3 files changed

+21
-4
lines changed

.yarn/versions/7ea1a917.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
releases:
2+
"@moonrepo/cli": patch
3+
"@moonrepo/core-linux-arm64-gnu": patch
4+
"@moonrepo/core-linux-arm64-musl": patch
5+
"@moonrepo/core-linux-x64-gnu": patch
6+
"@moonrepo/core-linux-x64-musl": patch
7+
"@moonrepo/core-macos-arm64": patch
8+
"@moonrepo/core-macos-x64": patch
9+
"@moonrepo/core-windows-x64-msvc": patch

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## Unreleased
4+
5+
#### 🐞 Fixes
6+
7+
- Reverted "Fixed an issue where task output wasn't captured for the "review" section in a run
8+
summary." as it caused a regression.
9+
310
## 1.32.8
411

512
#### 🐞 Fixes

crates/task-runner/src/command_executor.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ impl<'task> CommandExecutor<'task> {
113113
interactive: bool,
114114
) -> miette::Result<Output> {
115115
match (stream, interactive) {
116-
(true, false) | (true, true) => command.exec_stream_and_capture_output().await,
117-
(false, true) => command.exec_stream_output().await,
116+
(true, true) | (false, true) => command.exec_stream_output().await,
117+
(true, false) => command.exec_stream_and_capture_output().await,
118118
_ => command.exec_capture_output().await,
119119
}
120120
}
@@ -293,10 +293,11 @@ impl<'task> CommandExecutor<'task> {
293293

294294
fn prepare_state(&mut self, context: &ActionContext, report_item: &mut TaskReportItem) {
295295
let is_primary = context.is_primary_target(&self.task.target);
296+
let is_ci = is_ci_env();
296297

297298
// When a task is configured as local (no caching), or the interactive flag is passed,
298299
// we don't "capture" stdout/stderr (which breaks stdin) and let it stream natively.
299-
if !self.task.options.cache && context.primary_targets.len() == 1 {
300+
if !self.task.options.cache && context.primary_targets.len() == 1 && !is_ci {
300301
self.interactive = true;
301302
}
302303

@@ -305,7 +306,7 @@ impl<'task> CommandExecutor<'task> {
305306
self.stream = if let Some(output_style) = &self.task.options.output_style {
306307
matches!(output_style, TaskOutputStyle::Stream)
307308
} else {
308-
is_primary || is_ci_env()
309+
is_primary || is_ci
309310
};
310311

311312
// If only a single persistent task is being ran, we should not prefix the output.

0 commit comments

Comments
 (0)