X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fbootstrap%2Fconfig.rs;h=ba50ce9ec2426e99c362a666afdd5f2524995058;hb=bc9567fbf67977621663612450dc16a9fd4262a6;hp=21dc11c48081e8f18ac2da327378772b85a5cd8c;hpb=d69c33ad4c65e42a7a2d018a5c2ee1c7dbd0fc15;p=rust.git diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs index 21dc11c4808..ba50ce9ec24 100644 --- a/src/bootstrap/config.rs +++ b/src/bootstrap/config.rs @@ -80,7 +80,7 @@ pub struct Config { pub keep_stage_std: Vec, pub src: PathBuf, /// defaults to `config.toml` - pub config: PathBuf, + pub config: Option, pub jobs: Option, pub cmd: Subcommand, pub incremental: bool, @@ -926,8 +926,10 @@ pub fn parse(args: &[String]) -> Config { // Give a hard error if `--config` or `RUST_BOOTSTRAP_CONFIG` are set to a missing path, // but not if `config.toml` hasn't been created. let mut toml = if !using_default_path || toml_path.exists() { + config.config = Some(toml_path.clone()); get_toml(&toml_path) } else { + config.config = None; TomlConfig::default() }; @@ -942,7 +944,6 @@ pub fn parse(args: &[String]) -> Config { } config.changelog_seen = toml.changelog_seen; - config.config = toml_path; let build = toml.build.unwrap_or_default();