u-fix-build_01
authorRust Maintainers <pkg-rust-maintainers@lists.alioth.debian.org>
Wed, 9 Aug 2017 02:49:55 +0000 (03:49 +0100)
committerPeter Michael Green <plugwash@raspbian.org>
Wed, 9 Aug 2017 02:49:55 +0000 (03:49 +0100)
Gbp-Pq: Name u-fix-build_01.patch

src/bootstrap/flags.rs

index 1ed759d24c5489d581a5887a3974fc41b45b6601..0b26a5c9a5589e55fbdd84d1d3693ce272facc03 100644 (file)
@@ -234,11 +234,18 @@ Arguments:
         let cwd = t!(env::current_dir());
         let paths = matches.free[1..].iter().map(|p| cwd.join(p)).collect::<Vec<_>>();
 
+        let cfg_file = matches.opt_str("config").map(PathBuf::from).or_else(|| {
+            if fs::metadata("config.toml").is_ok() {
+                Some(PathBuf::from("config.toml"))
+            } else {
+                None
+            }
+        });
 
         // All subcommands can have an optional "Available paths" section
         if matches.opt_present("verbose") {
             let flags = Flags::parse(&["build".to_string()]);
-            let mut config = Config::default();
+            let mut config = Config::parse(&flags.build, cfg_file.clone());
             config.build = flags.build.clone();
             let mut build = Build::new(flags, config);
             metadata::build(&mut build);
@@ -295,14 +302,6 @@ Arguments:
         };
 
 
-        let cfg_file = matches.opt_str("config").map(PathBuf::from).or_else(|| {
-            if fs::metadata("config.toml").is_ok() {
-                Some(PathBuf::from("config.toml"))
-            } else {
-                None
-            }
-        });
-
         let mut stage = matches.opt_str("stage").map(|j| j.parse().unwrap());
 
         if matches.opt_present("incremental") {