Support relative paths in LSP & DAP binaries (#42135)

Closes #41214

Release Notes:

- Added support for relative paths in LSP and DAP binaries

---------

Co-authored-by: Cole Miller <cole@zed.dev>
Co-authored-by: Julia Ryan <juliaryan3.14@gmail.com>
This commit is contained in:
Andrew Farkas
2025-11-10 19:33:00 +00:00
committed by GitHub
co-authored by Cole Miller Julia Ryan
parent 2b369d7532
commit 3fbfea491d
4 changed files with 77 additions and 6 deletions
+4 -1
View File
@@ -261,7 +261,10 @@ impl DapStore {
.get(&adapter.name());
let user_installed_path = dap_settings.and_then(|s| match &s.binary {
DapBinary::Default => None,
DapBinary::Custom(binary) => Some(PathBuf::from(binary)),
DapBinary::Custom(binary) => {
// if `binary` is absolute, `.join()` will keep it unmodified
Some(worktree.read(cx).abs_path().join(PathBuf::from(binary)))
}
});
let user_args = dap_settings.map(|s| s.args.clone());
let user_env = dap_settings.map(|s| s.env.clone());