[REPBUILD] fail to run when kernel fails building

This commit is contained in:
Erin 2023-01-07 22:32:40 +01:00 committed by ondra05
parent 7ac54e5ec8
commit c241d839f2

View file

@ -89,7 +89,11 @@ fn build(release: bool) -> Result<(), Error> {
com.arg("-r");
}
com.status().into_report().change_context(Error::Build)?;
match com.status() {
Ok(s) if s.code() != Some(0) => bail!(Error::Build),
Err(e) => bail!(report!(e).change_context(Error::Build)),
_ => (),
}
(|| -> std::io::Result<_> {
io::copy(