fetch ssh shell
This commit is contained in:
parent
b2ba2de7b4
commit
7b3d73d6fd
1 changed files with 44 additions and 37 deletions
|
@ -273,6 +273,15 @@ impl Project {
|
||||||
env.extend(settings.env);
|
env.extend(settings.env);
|
||||||
|
|
||||||
let local_path = if is_ssh_terminal { None } else { path.clone() };
|
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) = {
|
let (spawn_task, shell) = {
|
||||||
match ssh_details {
|
match ssh_details {
|
||||||
|
@ -292,8 +301,14 @@ impl Project {
|
||||||
env.entry("TERM".to_string())
|
env.entry("TERM".to_string())
|
||||||
.or_insert_with(|| "xterm-256color".to_string());
|
.or_insert_with(|| "xterm-256color".to_string());
|
||||||
|
|
||||||
let (program, args) =
|
let (program, args) = wrap_for_ssh(
|
||||||
wrap_for_ssh(&shell, &ssh_command, None, path.as_deref(), env, path_style);
|
&shell,
|
||||||
|
&ssh_command,
|
||||||
|
None,
|
||||||
|
path.as_deref(),
|
||||||
|
env,
|
||||||
|
path_style,
|
||||||
|
);
|
||||||
env = HashMap::default();
|
env = HashMap::default();
|
||||||
if let Some(envs) = envs {
|
if let Some(envs) = envs {
|
||||||
env.extend(envs);
|
env.extend(envs);
|
||||||
|
@ -310,15 +325,7 @@ impl Project {
|
||||||
None => (None, settings.shell),
|
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| {
|
project.update(cx, move |this, cx| {
|
||||||
TerminalBuilder::new(
|
TerminalBuilder::new(
|
||||||
local_path.map(|path| path.to_path_buf()),
|
local_path.map(|path| path.to_path_buf()),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue