Fix compilation on windows

pull/3505/head
Blaž Hrastnik 2 years ago
parent cb7615e0ed
commit e863f6fe27
No known key found for this signature in database
GPG Key ID: 1238B9C4AD889640

@ -231,12 +231,11 @@ pub mod provider {
use super::*; use super::*;
use anyhow::{bail, Context as _, Result}; use anyhow::{bail, Context as _, Result};
#[cfg(not(windows))]
pub fn exists(executable_name: &str) -> bool { pub fn exists(executable_name: &str) -> bool {
which::which(executable_name).is_ok() which::which(executable_name).is_ok()
} }
#[cfg(not(any(windows, target_os = "macos")))] #[cfg(not(windows))]
pub fn env_var_is_set(env_var_name: &str) -> bool { pub fn env_var_is_set(env_var_name: &str) -> bool {
std::env::var_os(env_var_name).is_some() std::env::var_os(env_var_name).is_some()
} }

Loading…
Cancel
Save