We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents d53ddcd + dfbbdda commit f810a80Copy full SHA for f810a80
src/bootstrap/src/core/config/tests.rs
@@ -174,12 +174,14 @@ fn override_toml_duplicate() {
174
#[test]
175
fn profile_user_dist() {
176
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
- };
+ let contents =
+ if file.ends_with("config.toml") || env::var_os("RUST_BOOTSTRAP_CONFIG").is_some() {
+ "profile = \"user\"".to_owned()
+ } else {
+ assert!(file.ends_with("config.dist.toml"));
+ std::fs::read_to_string(file).unwrap()
183
+ };
184
+
185
toml::from_str(&contents)
186
.and_then(|table: toml::Value| TomlConfig::deserialize(table))
187
.unwrap()
0 commit comments