Skip to content

Commit

Permalink
Cleanly error on cargo pgx test build failure (#491)
Browse files Browse the repository at this point in the history
Signed-off-by: Ana Hobden <[email protected]>
  • Loading branch information
Hoverbear authored Mar 25, 2022
1 parent 42e28f6 commit 08c0eaf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cargo-pgx/src/command/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,10 @@ pub fn test_extension(
let status = command.status().wrap_err("failed to run cargo test")?;
tracing::trace!(status_code = %status, command = ?command, "Finished");
if !status.success() {
return Err(eyre!(
"cargo pgx test failed with status = {:?}",
status.code()
));
if !status.success() {
// We explicitly do not want to return a spantraced error here.
std::process::exit(1)
}
}

Ok(())
Expand Down

0 comments on commit 08c0eaf

Please sign in to comment.