Skip to content

Commit

Permalink
copilot: Update root path on Windows (zed-industries#11613)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
maxdeviant and huacnlee committed May 9, 2024
1 parent 5e06ce4 commit 981a143
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion crates/copilot/src/copilot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
)?;
Expand Down

0 comments on commit 981a143

Please sign in to comment.