diff --git a/ofborg/src/outpathdiff.rs b/ofborg/src/outpathdiff.rs index 0c21d3f..2e379d7 100644 --- a/ofborg/src/outpathdiff.rs +++ b/ofborg/src/outpathdiff.rs @@ -49,16 +49,16 @@ impl OutPathDiff { return result; } - pub fn find_before(&mut self) -> bool { + pub fn find_before(&mut self) -> Result { let x = self.run(); match x { Ok(f) => { self.original = Some(self.parse(f)); - return true; + return Ok(true); } - Err(_) => { + Err(e) => { info!("Failed to find Before list"); - return false; + return Err(e); } } } diff --git a/ofborg/src/tasks/massrebuilder.rs b/ofborg/src/tasks/massrebuilder.rs index 3af419c..1c77283 100644 --- a/ofborg/src/tasks/massrebuilder.rs +++ b/ofborg/src/tasks/massrebuilder.rs @@ -126,11 +126,19 @@ impl worker::SimpleWorker for MassRebuildWorker { hubcaps::statuses::State::Pending ); - if !rebuildsniff.find_before() { + if let Err(mut output) = rebuildsniff.find_before() { + overall_status.set_url(make_gist( + &gists, + "Output path comparison".to_owned(), + Some("".to_owned()), + file_to_str(&mut output), + )); + overall_status.set_with_description( - format!("Failed to enumerate outputs of {}", &target_branch).as_ref(), + format!("Target branch {} doesn't evaluate!", &target_branch).as_ref(), hubcaps::statuses::State::Failure ); + return self.actions().skip(&job); } @@ -293,7 +301,6 @@ impl worker::SimpleWorker for MassRebuildWorker { } } - status.set_url(gist_url); status.set(state.clone());