Skip to content

Commit b0d55e2

Browse files
feat: enable windows pty (#7780)
### Description Closes #7176 We still limit PTY usage to only those opted into the new UI as ConPTY emits a clear screen command on startup. While this is still undesired with the UI, it is far less disrupted as the command is contained to our task pane instead of the entire terminal. ### Testing Instructions On Windows: ``` npx create-turbo with-vite npm -e with-vite set TURBO_EXPERIMENTAL_UI=true turbo_dev --skip-infer dev ``` Closes TURBO-2659
1 parent e15e46b commit b0d55e2

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

crates/turborepo-lib/src/run/builder.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ pub struct RunBuilder {
6363

6464
impl RunBuilder {
6565
pub fn new(base: CommandBase, api_auth: Option<APIAuth>) -> Result<Self, Error> {
66-
let processes = ProcessManager::infer();
6766
let mut opts: Opts = base.args().try_into()?;
6867
let config = base.config()?;
6968
let is_linked = turborepo_api_client::is_linked(&api_auth);
@@ -88,6 +87,13 @@ impl RunBuilder {
8887
}
8988
let version = base.version();
9089
let experimental_ui = config.experimental_ui();
90+
let processes = ProcessManager::new(
91+
// We currently only use a pty if the following are met:
92+
// - we're attached to a tty
93+
atty::is(atty::Stream::Stdout) &&
94+
// - if we're on windows, we're using the UI
95+
(!cfg!(windows) || experimental_ui),
96+
);
9197
let CommandBase { repo_root, ui, .. } = base;
9298
Ok(Self {
9399
processes,

0 commit comments

Comments
 (0)