diff options
| -rw-r--r-- | installer-downloader/build.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/installer-downloader/build.rs b/installer-downloader/build.rs index 9bb62b77ee..c44a94c8cf 100644 --- a/installer-downloader/build.rs +++ b/installer-downloader/build.rs @@ -3,6 +3,11 @@ use std::env; fn main() -> anyhow::Result<()> { let target_os = env::var("CARGO_CFG_TARGET_OS").context("Missing 'CARGO_CFG_TARGET_OS")?; + let building_tests = env::var("CARGO_TARGET_TMPDIR").is_ok(); + + if building_tests { + return Ok(()); + } match target_os.as_str() { "windows" => win_main(), |
