From 981a143e9b03fe48d9640524c5004600a29f9845 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Thu, 9 May 2024 10:14:29 -0400 Subject: [PATCH] copilot: Update root path on Windows (#11613) This PR updates the root path used by Copilot to be a validate path when running on Windows. Release Notes: - N/A Co-authored-by: Jason Lee --- crates/copilot/src/copilot.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/crates/copilot/src/copilot.rs b/crates/copilot/src/copilot.rs index 7352ab6fe1fe1..00b34e3094425 100644 --- a/crates/copilot/src/copilot.rs +++ b/crates/copilot/src/copilot.rs @@ -429,11 +429,17 @@ impl Copilot { env: None, }; + let root_path = if cfg!(target_os = "windows") { + Path::new("C:/") + } else { + Path::new("/") + }; + let server = LanguageServer::new( Arc::new(Mutex::new(None)), new_server_id, binary, - Path::new("/"), + root_path, None, cx.clone(), )?;