Skip to content

Commit f810a80

Browse files
authored
Rollup merge of rust-lang#120207 - onur-ozkan:120202-fix, r=clubby789
check `RUST_BOOTSTRAP_CONFIG` in `profile_user_dist` test Fixes a logical bug in `profile_user_dist` test (explained in rust-lang#120202).
2 parents d53ddcd + dfbbdda commit f810a80

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

src/bootstrap/src/core/config/tests.rs

+8-6
Original file line numberDiff line numberDiff line change
@@ -174,12 +174,14 @@ fn override_toml_duplicate() {
174174
#[test]
175175
fn profile_user_dist() {
176176
fn get_toml(file: &Path) -> TomlConfig {
177-
let contents = if file.ends_with("config.toml") {
178-
"profile = \"user\"".to_owned()
179-
} else {
180-
assert!(file.ends_with("config.dist.toml"));
181-
std::fs::read_to_string(file).unwrap()
182-
};
177+
let contents =
178+
if file.ends_with("config.toml") || env::var_os("RUST_BOOTSTRAP_CONFIG").is_some() {
179+
"profile = \"user\"".to_owned()
180+
} else {
181+
assert!(file.ends_with("config.dist.toml"));
182+
std::fs::read_to_string(file).unwrap()
183+
};
184+
183185
toml::from_str(&contents)
184186
.and_then(|table: toml::Value| TomlConfig::deserialize(table))
185187
.unwrap()

0 commit comments

Comments
 (0)