From dad19d6fc9a268076c4ae4217229e0ddb2024c58 Mon Sep 17 00:00:00 2001 From: Dustin Blackman Date: Thu, 30 Nov 2023 22:13:26 -0500 Subject: [PATCH] fix: Check for exe --- src/binary.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/binary.rs b/src/binary.rs index f561a32..16404df 100644 --- a/src/binary.rs +++ b/src/binary.rs @@ -127,8 +127,11 @@ pub fn install(binary_package: metadata::BinaryPackage) -> Result { .join(binary_package.package.clone()) .join(binary_package.version.clone()); let cache_bin_path = cache_path.join("bin").join(bin_name); + let mut cache_bin_path_win = cache_bin_path.clone(); + cache_bin_path_win.set_extension("exe"); - if !path::Path::new(&cache_bin_path).exists() { + if !path::Path::new(&cache_bin_path).exists() && !path::Path::new(&cache_bin_path_win).exists() + { fs::create_dir_all(&cache_path)?; if binary_package.bin_target.is_none() && binary_package.features.is_none()