From 6d724a8f331f4b2a8f1a001e990cf6129dc50b00 Mon Sep 17 00:00:00 2001 From: Michael Davis Date: Tue, 23 Jan 2024 09:29:07 -0500 Subject: 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`. --- helix-loader/Cargo.toml | 1 - helix-loader/src/grammar.rs | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'helix-loader') diff --git a/helix-loader/Cargo.toml b/helix-loader/Cargo.toml index 08da7f29..469bedc1 100644 --- a/helix-loader/Cargo.toml +++ b/helix-loader/Cargo.toml @@ -24,7 +24,6 @@ etcetera = "0.8" tree-sitter.workspace = true once_cell = "1.19" log = "0.4" -which = "5.0.0" # TODO: these two should be on !wasm32 only diff --git a/helix-loader/src/grammar.rs b/helix-loader/src/grammar.rs index 66111aeb..537e1282 100644 --- a/helix-loader/src/grammar.rs +++ b/helix-loader/src/grammar.rs @@ -86,7 +86,7 @@ pub fn get_language(name: &str) -> Result { } fn ensure_git_is_available() -> Result<()> { - match which::which("git") { + match helix_stdx::env::which("git") { Ok(_cmd) => Ok(()), Err(err) => Err(anyhow::anyhow!("'git' could not be found ({err})")), } -- cgit v1.2.3-70-g09d2