From 08c0eafaf460f37bf59761bf8f6c520a29719bf0 Mon Sep 17 00:00:00 2001 From: Ana Hobden Date: Fri, 25 Mar 2022 15:16:53 -0700 Subject: [PATCH] Cleanly error on cargo pgx test build failure (#491) Signed-off-by: Ana Hobden --- cargo-pgx/src/command/test.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cargo-pgx/src/command/test.rs b/cargo-pgx/src/command/test.rs index 6ef7ee1c6..e6720f195 100644 --- a/cargo-pgx/src/command/test.rs +++ b/cargo-pgx/src/command/test.rs @@ -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(())