Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions crates/remote/src/ssh_session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ impl SshSocket {
}

async fn platform(&self) -> Result<SshPlatform> {
let uname = self.run_command("sh", &["-c", "uname -sm"]).await?;
let uname = self.run_command("sh", &["-lc", "uname -sm"]).await?;
let Some((os, arch)) = uname.split_once(" ") else {
anyhow::bail!("unknown uname: {uname:?}")
};
Expand Down Expand Up @@ -481,7 +481,7 @@ impl SshSocket {
}

async fn shell(&self) -> String {
match self.run_command("sh", &["-c", "echo $SHELL"]).await {
match self.run_command("sh", &["-lc", "echo $SHELL"]).await {
Ok(shell) => shell.trim().to_owned(),
Err(e) => {
log::error!("Failed to get shell: {e}");
Expand Down Expand Up @@ -1538,7 +1538,7 @@ impl RemoteConnection for SshRemoteConnection {

let ssh_proxy_process = match self
.socket
.ssh_command("sh", &["-c", &start_proxy_command])
.ssh_command("sh", &["-lc", &start_proxy_command])
// IMPORTANT: we kill this process when we drop the task that uses it.
.kill_on_drop(true)
.spawn()
Expand Down Expand Up @@ -1915,7 +1915,7 @@ impl SshRemoteConnection {
.run_command(
"sh",
&[
"-c",
"-lc",
&shell_script!("mkdir -p {parent}", parent = parent.to_string().as_ref()),
],
)
Expand Down Expand Up @@ -1993,7 +1993,7 @@ impl SshRemoteConnection {
.run_command(
"sh",
&[
"-c",
"-lc",
&shell_script!("mkdir -p {parent}", parent = parent.to_string().as_ref()),
],
)
Expand Down Expand Up @@ -2041,7 +2041,7 @@ impl SshRemoteConnection {
dst_path = &dst_path.to_string()
)
};
self.socket.run_command("sh", &["-c", &script]).await?;
self.socket.run_command("sh", &["-lc", &script]).await?;
Ok(())
}

Expand Down
Loading