Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get only last line of uname -sm output on remote server #25383

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion crates/remote/src/ssh_session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1634,7 +1634,7 @@ impl SshRemoteConnection {

async fn platform(&self) -> Result<SshPlatform> {
let uname = self.socket.run_command("uname", &["-sm"]).await?;
let Some((os, arch)) = uname.split_once(" ") else {
let Some((os, arch)) = uname.lines().last().unwrap_or("").split_once(" ") else {
Err(anyhow!("unknown uname: {uname:?}"))?
};

Expand Down
Loading