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 <huacnlee@gmail.com>
This commit is contained in:
Marshall Bowers
2024-05-09 10:14:29 -04:00
committed by GitHub
co-authored by Jason Lee
parent 5e06ce4df3
commit 981a143e9b
+7 -1
View File
@@ -429,11 +429,17 @@ impl Copilot {
env: None, env: None,
}; };
let root_path = if cfg!(target_os = "windows") {
Path::new("C:/")
} else {
Path::new("/")
};
let server = LanguageServer::new( let server = LanguageServer::new(
Arc::new(Mutex::new(None)), Arc::new(Mutex::new(None)),
new_server_id, new_server_id,
binary, binary,
Path::new("/"), root_path,
None, None,
cx.clone(), cx.clone(),
)?; )?;