SSH Remoting: Improve unsupported error messages (#20529)

Updates #19697

Release Notes:

- SSH Remoting: Improved error message on unsupported OS/Arch.
This commit is contained in:
Conrad Irwin 2024-11-11 22:26:05 -07:00 committed by GitHub
parent ab20681818
commit e4bf586cff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1549,14 +1549,18 @@ impl SshRemoteConnection {
let os = match os.trim() { let os = match os.trim() {
"Darwin" => "macos", "Darwin" => "macos",
"Linux" => "linux", "Linux" => "linux",
_ => Err(anyhow!("unknown uname os {os:?}"))?, _ => Err(anyhow!(
"Prebuilt remote servers are not yet available for {os:?}. See https://zed.dev/docs/remote-development"
))?,
}; };
let arch = if arch.starts_with("arm") || arch.starts_with("aarch64") { let arch = if arch.starts_with("arm") || arch.starts_with("aarch64") {
"aarch64" "aarch64"
} else if arch.starts_with("x86") || arch.starts_with("i686") { } else if arch.starts_with("x86") || arch.starts_with("i686") {
"x86_64" "x86_64"
} else { } else {
Err(anyhow!("unknown uname architecture {arch:?}"))? Err(anyhow!(
"Prebuilt remote servers are not yet available for {arch:?}. See https://zed.dev/docs/remote-development"
))?
}; };
Ok(SshPlatform { os, arch }) Ok(SshPlatform { os, arch })