Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Revert "Remote: Change "sh -c" to "sh -lc" (#36760)" (#37417)
Max Brunsfeldbb13228ad599
diff --git a/crates/remote/src/transport/ssh.rs b/crates/remote/src/transport/ssh.rsindex 0995e0dd611..42c6da04b5c 100644--- a/crates/remote/src/transport/ssh.rs+++ b/crates/remote/src/transport/ssh.rs@@ -254,7 +254,7 @@ impl RemoteConnection for SshRemoteConnection {let ssh_proxy_process = match self.socket- .ssh_command("sh", &["-lc", &start_proxy_command])+ .ssh_command("sh", &["-c", &start_proxy_command])// IMPORTANT: we kill this process when we drop the task that uses it..kill_on_drop(true).spawn()@@ -529,7 +529,7 @@ impl SshRemoteConnection {.run_command("sh",&[- "-lc",+ "-c",&shell_script!("mkdir -p {parent}", parent = parent.to_string().as_ref()),],)@@ -607,7 +607,7 @@ impl SshRemoteConnection {.run_command("sh",&[- "-lc",+ "-c",&shell_script!("mkdir -p {parent}", parent = parent.to_string().as_ref()),],)@@ -655,7 +655,7 @@ impl SshRemoteConnection {dst_path = &dst_path.to_string())};- self.socket.run_command("sh", &["-lc", &script]).await?;+ self.socket.run_command("sh", &["-c", &script]).await?;Ok(())}@@ -797,7 +797,7 @@ impl SshSocket {}async fn platform(&self) -> Result<RemotePlatform> {- let uname = self.run_command("sh", &["-lc", "uname -sm"]).await?;+ let uname = self.run_command("sh", &["-c", "uname -sm"]).await?;let Some((os, arch)) = uname.split_once(" ") else {anyhow::bail!("unknown uname: {uname:?}")};@@ -828,7 +828,7 @@ impl SshSocket {}async fn shell(&self) -> String {- match self.run_command("sh", &["-lc", "echo $SHELL"]).await {+ match self.run_command("sh", &["-c", "echo $SHELL"]).await {Ok(shell) => shell.trim().to_owned(),Err(e) => {log::error!("Failed to get shell: {e}");