aboutsummaryrefslogtreecommitdiff
path: root/helix-dap/src/client.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-dap/src/client.rs')
-rw-r--r--helix-dap/src/client.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/helix-dap/src/client.rs b/helix-dap/src/client.rs
index 98b88e23..79c65cf7 100644
--- a/helix-dap/src/client.rs
+++ b/helix-dap/src/client.rs
@@ -113,16 +113,14 @@ impl Client {
}
pub async fn tcp_process(
- cmd: &str,
- args: Vec<&str>,
- port_format: &str,
+ config: DebugAdapterConfig,
id: usize,
) -> Result<(Self, UnboundedReceiver<Payload>)> {
let port = Self::get_port().await.unwrap();
- let process = Command::new(cmd)
- .args(args)
- .args(port_format.replace("{}", &port.to_string()).split(' '))
+ let process = Command::new(config.command)
+ .args(config.args)
+ .args(config.port_arg.replace("{}", &port.to_string()).split(' '))
// silence messages
.stdin(Stdio::null())
.stdout(Stdio::null())