fetch ssh shell

This commit is contained in:
Lukas Wirth 2025-08-20 09:50:33 +02:00
parent b2ba2de7b4
commit 7b3d73d6fd

View file

@ -273,6 +273,15 @@ impl Project {
env.extend(settings.env);
let local_path = if is_ssh_terminal { None } else { path.clone() };
let toolchain =
project_path_context.map(|p| self.active_toolchain(p, LanguageName::new("Python"), cx));
cx.spawn(async move |project, cx| {
let toolchain = maybe!(async {
let toolchain = toolchain?.await?;
Some(())
})
.await;
let (spawn_task, shell) = {
match ssh_details {
@ -292,8 +301,14 @@ impl Project {
env.entry("TERM".to_string())
.or_insert_with(|| "xterm-256color".to_string());
let (program, args) =
wrap_for_ssh(&shell, &ssh_command, None, path.as_deref(), env, path_style);
let (program, args) = wrap_for_ssh(
&shell,
&ssh_command,
None,
path.as_deref(),
env,
path_style,
);
env = HashMap::default();
if let Some(envs) = envs {
env.extend(envs);
@ -310,15 +325,7 @@ impl Project {
None => (None, settings.shell),
}
};
let toolchain =
project_path_context.map(|p| self.active_toolchain(p, LanguageName::new("Python"), cx));
cx.spawn(async move |project, cx| {
let toolchain = maybe!(async {
let toolchain = toolchain?.await?;
Some(())
})
.await;
project.update(cx, move |this, cx| {
TerminalBuilder::new(
local_path.map(|path| path.to_path_buf()),