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:
2
build.rs
2
build.rs
@ -113,7 +113,7 @@ impl bindgen::callbacks::ParseCallbacks for RemoveEnumVariantSuffixes {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn main() {
|
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
|
// Resolve bash from directories listed in the PATH environment variable in the
|
||||||
// order they appear.
|
// order they appear.
|
||||||
Command::new("cmd")
|
Command::new("cmd")
|
||||||
|
|||||||
Reference in New Issue
Block a user