diff --git a/src/bootstrap/src/core/sanity.rs b/src/bootstrap/src/core/sanity.rs index af4ec679d080..4ef9316d00b6 100644 --- a/src/bootstrap/src/core/sanity.rs +++ b/src/bootstrap/src/core/sanity.rs @@ -361,8 +361,11 @@ than building it. // There are three builds of cmake on windows: MSVC, MinGW, and // Cygwin. The Cygwin build does not have generators for Visual // Studio, so detect that here and error. - let out = - command("cmake").arg("--help").run_always().run_capture_stdout(build).stdout(); + let out = command("cmake") + .arg("--help") + .run_always() + .run_capture_stdout_exec_ctx(&build) + .stdout(); if !out.contains("Visual Studio") { panic!( "