From 0fcacd0e6cb542ad3776c675ff408efc583f4cc8 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Wed, 22 Feb 2023 08:56:53 -0800 Subject: [PATCH] Scrub more environment variables from the test environment. --- crates/cargo-test-support/src/lib.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/cargo-test-support/src/lib.rs b/crates/cargo-test-support/src/lib.rs index 8e60c50ef..04d6ce9f8 100644 --- a/crates/cargo-test-support/src/lib.rs +++ b/crates/cargo-test-support/src/lib.rs @@ -1241,15 +1241,20 @@ pub trait TestEnv: Sized { // Don't read the system git config which is out of our control. .env("GIT_CONFIG_NOSYSTEM", "1") .env_remove("__CARGO_DEFAULT_LIB_METADATA") + .env_remove("ALL_PROXY") .env_remove("EMAIL") .env_remove("GIT_AUTHOR_EMAIL") .env_remove("GIT_AUTHOR_NAME") .env_remove("GIT_COMMITTER_EMAIL") .env_remove("GIT_COMMITTER_NAME") + .env_remove("http_proxy") + .env_remove("HTTPS_PROXY") + .env_remove("https_proxy") .env_remove("MAKEFLAGS") .env_remove("MFLAGS") .env_remove("MSYSTEM") // assume cmd.exe everywhere on windows .env_remove("RUSTC") + .env_remove("RUSTC_WORKSPACE_WRAPPER") .env_remove("RUSTC_WRAPPER") .env_remove("RUSTDOC") .env_remove("RUSTDOCFLAGS")