aboutsummaryrefslogtreecommitdiff
path: root/helix-term
diff options
context:
space:
mode:
authorEric Thorburn2022-12-17 19:03:18 +0000
committerGitHub2022-12-17 19:03:18 +0000
commitb12c65678aacc577b070c70307ef6fce528e4d85 (patch)
treebf3a79108792c000e6aaa13bc0d965b450876f0f /helix-term
parent9c9c775a27f23b2fa5c8c856af0b15671916efd6 (diff)
Print the binary required by the debug adapter (#5195)
This commit addresses issue 5193, where the author requested that the name of the binary needed is printed along with the rest of the health information. This commit adds a format! macro which formats in the name of the binary and then it will be printed along with the rest of the debug information. The value in cmd is referenced to the call to which, and then consumed upon the call to format!
Diffstat (limited to 'helix-term')
-rw-r--r--helix-term/src/health.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/helix-term/src/health.rs b/helix-term/src/health.rs
index e8fbb84d..6558fe19 100644
--- a/helix-term/src/health.rs
+++ b/helix-term/src/health.rs
@@ -281,9 +281,9 @@ fn probe_protocol(protocol_name: &str, server_cmd: Option<String>) -> std::io::R
writeln!(stdout, "Configured {}: {}", protocol_name, cmd_name)?;
if let Some(cmd) = server_cmd {
- let path = match which::which(cmd) {
+ let path = match which::which(&cmd) {
Ok(path) => path.display().to_string().green(),
- Err(_) => "Not found in $PATH".to_string().red(),
+ Err(_) => format!("'{}' not found in $PATH", cmd).red(),
};
writeln!(stdout, "Binary for {}: {}", protocol_name, path)?;
}