From 6c2b4ce26ee5e63b48fa0f1006c96e99b19c5403 Mon Sep 17 00:00:00 2001 From: Vulpesx Date: Thu, 15 Aug 2024 20:01:41 +1000 Subject: [PATCH] support changing wd by dap --- helix-view/src/handlers/dap.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/helix-view/src/handlers/dap.rs b/helix-view/src/handlers/dap.rs index fd50340c1..9c7929ba5 100644 --- a/helix-view/src/handlers/dap.rs +++ b/helix-view/src/handlers/dap.rs @@ -368,6 +368,14 @@ impl Editor { }; let mut process = std::process::Command::new(config.command); + process + .args( + config + .args + .into_iter() + .map(|s| s.replace("%{cwd}", &arguments.cwd)), // temporary until #11164 is merged + ) + .current_dir(arguments.cwd); if config.join_args { process.arg(arguments.args.join(" "));