From bfe141ea79aa4984028934067ba75c48d99136ae Mon Sep 17 00:00:00 2001 From: Julia Ryan Date: Fri, 21 Nov 2025 18:23:52 -0800 Subject: [PATCH] Fix wsl path parsing (#43295) Closes #40286 Release Notes: - N/A --------- Co-authored-by: John Tur --- crates/cli/src/main.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/crates/cli/src/main.rs b/crates/cli/src/main.rs index a16f5a3bab9849ee93abac4e2eccb602698b65de..335e75ac4f5e43e63159fb26018849d8e0a22ced 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 { .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())) }