Skip to content

Commit

Permalink
fix: close stdin for non-interactive tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-olszewski committed Jul 25, 2024
1 parent 681bfab commit 59d223c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions crates/turborepo-lib/src/task_graph/visitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -952,6 +952,13 @@ impl ExecContext {
}
}

// Even if user does not have the TUI and cannot interact with a task, we keep
// stdin open for persistent tasks as some programs will shut down if stdin is
// closed.
if !self.takes_input {
process.stdin();
}

let mut stdout_writer = self
.task_cache
.output_writer(prefixed_ui.task_writer())
Expand Down

0 comments on commit 59d223c

Please sign in to comment.