diff --git a/repbuild/src/main.rs b/repbuild/src/main.rs
index bfd139e..c218942 100644
--- a/repbuild/src/main.rs
+++ b/repbuild/src/main.rs
@@ -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(