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:
co-authored by
Cole Miller
Julia Ryan
parent
2b369d7532
commit
3fbfea491d
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user