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.
This commit is contained in:
Thomas Bell
2024-07-24 22:34:38 +08:00
parent 6a84932ffe
commit 2377d7b872

View File

@ -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")