From 2ebefd73cfb9eea38497146140658f133e34facc Mon Sep 17 00:00:00 2001 From: Vulpesx Date: Thu, 15 Aug 2024 20:01:26 +1000 Subject: [PATCH] support changing env by dap --- helix-view/src/handlers/dap.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/helix-view/src/handlers/dap.rs b/helix-view/src/handlers/dap.rs index 2d7a0f73d..fd50340c1 100644 --- a/helix-view/src/handlers/dap.rs +++ b/helix-view/src/handlers/dap.rs @@ -375,6 +375,15 @@ impl Editor { process.args(arguments.args); } + if let Some(env) = arguments.env { + for (k, v) in env { + match v { + Some(v) => process.env(k, v), + None => process.env_remove(k), + }; + } + } + let process = match process.spawn() { Ok(process) => process, Err(err) => {