Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
extension_host: Sanitize cwd path for ResolvedTask (#38357)
Jakub Konka96111c6ef3c1
diff --git a/crates/extension_host/src/wasm_host/wit/since_v0_6_0.rs b/crates/extension_host/src/wasm_host/wit/since_v0_6_0.rsindex 84794d5386e..e879ed0cb01 100644--- a/crates/extension_host/src/wasm_host/wit/since_v0_6_0.rs+++ b/crates/extension_host/src/wasm_host/wit/since_v0_6_0.rs@@ -309,7 +309,14 @@ impl TryFrom<SpawnInTerminal> for ResolvedTask {command: value.command.context("missing command")?,args: value.args,env: value.env.into_iter().collect(),- cwd: value.cwd.map(|s| s.to_string_lossy().into_owned()),+ cwd: value.cwd.map(|s| {+ let s = s.to_string_lossy();+ if cfg!(target_os = "windows") {+ s.replace('\\', "/")+ } else {+ s.into_owned()+ }+ }),})}}