]> git.lizzy.rs Git - rust.git/blobdiff - src/bootstrap/config.rs
Place config.toml in current working directory if config not found
[rust.git] / src / bootstrap / config.rs
index 21dc11c48081e8f18ac2da327378772b85a5cd8c..c086d248e5ce11a8e7c4fa3e60a6951635dbfcb2 100644 (file)
@@ -80,7 +80,7 @@ pub struct Config {
     pub keep_stage_std: Vec<u32>,
     pub src: PathBuf,
     /// defaults to `config.toml`
-    pub config: PathBuf,
+    pub config: Option<PathBuf>,
     pub jobs: Option<u32>,
     pub cmd: Subcommand,
     pub incremental: bool,
@@ -942,7 +942,7 @@ pub fn parse(args: &[String]) -> Config {
         }
 
         config.changelog_seen = toml.changelog_seen;
-        config.config = toml_path;
+        config.config = if toml_path.exists() { Some(toml_path) } else { None };
 
         let build = toml.build.unwrap_or_default();