summaryrefslogtreecommitdiff
path: root/helix-view/src/env.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-view/src/env.rs')
-rw-r--r--helix-view/src/env.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/helix-view/src/env.rs b/helix-view/src/env.rs
new file mode 100644
index 00000000..c68cc609
--- /dev/null
+++ b/helix-view/src/env.rs
@@ -0,0 +1,8 @@
+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()
+}