Skip to content

Commit

Permalink
Set the RUSTUP_OVERRIDE_UNIX_FALLBACK_SETTINGS env variable in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
frazar committed Nov 2, 2020
1 parent 1daea70 commit 699afcc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/mock/clitools.rs
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,13 @@ pub fn env<E: rustup_test::Env>(config: &Config, cmd: &mut E) {
.join("tests/mock/signing-key.pub.asc"),
);

// The unix fallback settings file may be present in the test environment, so override
// the path to the settings file with a non-existing path to avoid intereference
cmd.env(
"RUSTUP_OVERRIDE_UNIX_FALLBACK_SETTINGS",
"/bogus-config-file.toml",
);

if let Some(root) = config.rustup_update_root.as_ref() {
cmd.env("RUSTUP_UPDATE_ROOT", root);
}
Expand Down

0 comments on commit 699afcc

Please sign in to comment.