diff --git a/crates/project/src/terminals.rs b/crates/project/src/terminals.rs index 360391210c..4a0a1790b4 100644 --- a/crates/project/src/terminals.rs +++ b/crates/project/src/terminals.rs @@ -417,6 +417,12 @@ impl Project { cx: &mut Context<'_, Project>, cwd: Option, ) -> Task>> { + // We cannot clone the task's terminal, as it will effectively re-spawn the task, which might not be desirable. + // For now, create a new shell instead. + if terminal.read(cx).task().is_some() { + return self.create_terminal_shell(cwd, cx); + } + let local_path = if self.is_via_remote_server() { None } else { diff --git a/crates/terminal/src/terminal.rs b/crates/terminal/src/terminal.rs index e35a3ae4e1..fa42a94e93 100644 --- a/crates/terminal/src/terminal.rs +++ b/crates/terminal/src/terminal.rs @@ -454,7 +454,7 @@ impl TerminalBuilder { args: Option>, title_override: Option, ) -> Self { - log::info!("Using {program} as shell"); + log::debug!("Using {program} as shell"); Self { program, args,