aboutsummaryrefslogtreecommitdiff
path: root/helix-dap
diff options
context:
space:
mode:
Diffstat (limited to 'helix-dap')
-rw-r--r--helix-dap/Cargo.toml1
-rw-r--r--helix-dap/src/client.rs3
2 files changed, 4 insertions, 0 deletions
diff --git a/helix-dap/Cargo.toml b/helix-dap/Cargo.toml
index 24288697..95a05905 100644
--- a/helix-dap/Cargo.toml
+++ b/helix-dap/Cargo.toml
@@ -19,6 +19,7 @@ serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
thiserror = "1.0"
tokio = { version = "1", features = ["rt", "rt-multi-thread", "io-util", "io-std", "time", "process", "macros", "fs", "parking_lot", "net", "sync"] }
+which = "4.2"
[dev-dependencies]
fern = "0.6"
diff --git a/helix-dap/src/client.rs b/helix-dap/src/client.rs
index 56254429..9498c64c 100644
--- a/helix-dap/src/client.rs
+++ b/helix-dap/src/client.rs
@@ -105,6 +105,9 @@ impl Client {
args: Vec<&str>,
id: usize,
) -> Result<(Self, UnboundedReceiver<Payload>)> {
+ // Resolve path to the binary
+ let cmd = which::which(cmd).map_err(|err| anyhow::anyhow!(err))?;
+
let process = Command::new(cmd)
.args(args)
.stdin(Stdio::piped())