diff --git a/ofborg/src/bin/builder.rs b/ofborg/src/bin/builder.rs index 63bc3d5..0a7576b 100644 --- a/ofborg/src/bin/builder.rs +++ b/ofborg/src/bin/builder.rs @@ -49,18 +49,20 @@ fn main() { let cloner = checkout::cached_cloner(Path::new(&cfg.checkout.root)); let nix = cfg.nix(); - let full_logs: bool = match cfg.feedback.full_logs { - Some(true) => true, - None => { + + + let full_logs: bool; + match &cfg.feedback { + &Some(ref feedback) => { + full_logs = feedback.full_logs; + } + &None => { warn!("Please define feedback.full_logs in your configuration to true or false!"); warn!("feedback.full_logs when true will cause the full build log to be sent back to the server, and be viewable by everyone."); warn!("I strongly encourage everybody turn this on!"); - false + full_logs = false; } - _ => { - false - } - }; + } channel.basic_prefetch(1).unwrap(); channel.basic_consume( diff --git a/ofborg/src/config.rs b/ofborg/src/config.rs index e31524b..1a6e2b5 100644 --- a/ofborg/src/config.rs +++ b/ofborg/src/config.rs @@ -14,7 +14,7 @@ use ofborg::acl; #[derive(Serialize, Deserialize, Debug)] pub struct Config { pub runner: RunnerConfig, - pub feedback: FeedbackConfig, + pub feedback: Option, pub checkout: CheckoutConfig, pub nix: NixConfig, pub rabbitmq: RabbitMQConfig, @@ -23,7 +23,7 @@ pub struct Config { #[derive(Serialize, Deserialize, Debug)] pub struct FeedbackConfig { - pub full_logs: Option, + pub full_logs: bool, } #[derive(Serialize, Deserialize, Debug)]