mirror of https://github.com/helix-editor/helix
Re-export `which` from `helix-stdx::env`
We use `which::which` in many crates, so `which` was a separate dependency across all of them. We can centralize `which` into the stdx crate so it's easy for all crates to depend on it. I also moved the rest of `helix-view/src/env.rs` into helix-stdx's `env` module since it only contained a thin wrapper around `which` and `std::env`.allowlist
parent
6bfe1ddc53
commit
6d724a8f33
@ -1,8 +0,0 @@
|
|||||||
pub fn binary_exists(binary_name: &str) -> bool {
|
|
||||||
which::which(binary_name).is_ok()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(not(windows))]
|
|
||||||
pub fn env_var_is_set(env_var_name: &str) -> bool {
|
|
||||||
std::env::var_os(env_var_name).is_some()
|
|
||||||
}
|
|
Loading…
Reference in New Issue