We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 228a0ed commit 3156debCopy full SHA for 3156deb
src/bootstrap/config.rs
@@ -444,8 +444,7 @@ impl Config {
444
445
let toml = file
446
.map(|file| {
447
- let contents = t!(fs::read_to_string(&file));
448
- match toml::from_str(&contents) {
+ fs::read_to_string(&file).ok().map(|contents| match toml::from_str(&contents) {
449
Ok(table) => table,
450
Err(err) => {
451
println!(
@@ -455,8 +454,9 @@ impl Config {
455
454
);
456
process::exit(2);
457
}
458
- }
+ })
459
})
+ .flatten()
460
.unwrap_or_else(TomlConfig::default);
461
462
let build = toml.build.clone().unwrap_or_default();
0 commit comments