diff --git a/crates/project/src/terminals.rs b/crates/project/src/terminals.rs index 360391210c75d88e67b1e08be3e0c865b33397c8..4a0a1790b49449fd82b8aeff58f6c11c8e63261b 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 e35a3ae4e14dec8c510e4858adaeabb789436de0..fa42a94e932a81d171ffc871393a30abf965678f 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,