Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Fix terminal doesn't switch to project directory when opening remote project on Windows (#45328)

feeiyuea34cc5324c1
diff --git a/crates/remote/src/transport/ssh.rs b/crates/remote/src/transport/ssh.rs
index 6c8eb49c1c2..d13e1c49349 100644
--- a/crates/remote/src/transport/ssh.rs
+++ b/crates/remote/src/transport/ssh.rs
@@ -32,8 +32,7 @@ use tempfile::TempDir;
use util::{
paths::{PathStyle, RemotePathBuf},
rel_path::RelPath,
- shell::{Shell, ShellKind},
- shell_builder::ShellBuilder,
+ shell::ShellKind,
};
pub(crate) struct SshRemoteConnection {
@@ -1544,8 +1543,6 @@ fn build_command(
} else {
write!(exec, "{ssh_shell} -l")?;
};
- let (command, command_args) = ShellBuilder::new(&Shell::Program(ssh_shell.to_owned()), false)
- .build(Some(exec.clone()), &[]);
let mut args = Vec::new();
args.extend(ssh_args);
@@ -1556,8 +1553,7 @@ fn build_command(
}
args.push("-t".into());
- args.push(command);
- args.extend(command_args);
+ args.push(exec);
Ok(CommandTemplate {
program: "ssh".into(),
@@ -1597,9 +1593,6 @@ mod tests {
"-p",
"2222",
"-t",
- "/bin/fish",
- "-i",
- "-c",
"cd \"$HOME/work\" && exec env INPUT_VA=val remote_program arg1 arg2"
]
);
@@ -1632,9 +1625,6 @@ mod tests {
"-L",
"1:foo:2",
"-t",
- "/bin/fish",
- "-i",
- "-c",
"cd && exec env INPUT_VA=val /bin/fish -l"
]
);