Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Fix wsl path parsing (#43295)
Julia Ryanbfe141ea79aa
diff --git a/crates/cli/src/main.rs b/crates/cli/src/main.rsindex a16f5a3bab9..335e75ac4f5 100644--- a/crates/cli/src/main.rs+++ b/crates/cli/src/main.rs@@ -178,14 +178,13 @@ fn parse_path_in_wsl(source: &str, wsl: &str) -> Result<String> {.arg("--distribution").arg(distro_name).arg("--exec")- .arg("wslpath")- .arg("-m")+ .arg("realpath")+ .arg("-s").arg(&source.path).output()?;let result = String::from_utf8_lossy(&output.stdout);- let prefix = format!("//wsl.localhost/{}", distro_name);- source.path = Path::new(result.trim().strip_prefix(&prefix).unwrap_or(&result)).to_owned();+ source.path = Path::new(result.trim()).to_owned();Ok(source.to_string(|path| path.to_string_lossy().into_owned()))}