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
parent 5e06ce4df3
commit 981a143e9b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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(),
)?;