From 2377d7b872ad6a51ae15e47f38c16d2ad0ac7174 Mon Sep 17 00:00:00 2001 From: Thomas Bell Date: Wed, 24 Jul 2024 22:34:38 +0800 Subject: [PATCH] Prevent using the `bash` command when using MSVC This is to prevent a nasty issue where on fresh installations of Windows, the `bash` command returns with success and prints a prompt to install WSL, which gets mistaken for MagickCore-config output. --- build.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.rs b/build.rs index c14ac6f..4813866 100644 --- a/build.rs +++ b/build.rs @@ -113,7 +113,7 @@ impl bindgen::callbacks::ParseCallbacks for RemoveEnumVariantSuffixes { } fn main() { - let check_cppflags = if cfg!(target_os = "windows") { + let check_cppflags = if cfg!(all(target_os = "windows", not(target_env = "msvc"))) { // Resolve bash from directories listed in the PATH environment variable in the // order they appear. Command::new("cmd")