From f8abc8df8dca8e6e90641ff86233523fb797f0d0 Mon Sep 17 00:00:00 2001 From: Yihau Chen Date: Thu, 16 Mar 2023 11:58:08 +0800 Subject: [PATCH] ci: fix do-audit don't report error (#30728) * ci: fix do-audit don't retport error * Update ci/do-audit.sh Co-authored-by: Trent Nelson * use the latest suggestion * lint * redirect stderr to stdout * another solution --------- Co-authored-by: Trent Nelson --- ci/do-audit.sh | 2 ++ ci/docker-run.sh | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ci/do-audit.sh b/ci/do-audit.sh index d7c16187d71e2a..216480ed1eaa2c 100755 --- a/ci/do-audit.sh +++ b/ci/do-audit.sh @@ -30,3 +30,5 @@ cargo_audit_ignores=( --ignore RUSTSEC-2023-0001 ) scripts/cargo-for-all-lock-files.sh audit "${cargo_audit_ignores[@]}" | $dep_tree_filter +# we want the `cargo audit` exit code, not `$dep_tree_filter`'s +exit "${PIPESTATUS[0]}" diff --git a/ci/docker-run.sh b/ci/docker-run.sh index 0df66f2a881b05..b7a1c3a4d05efa 100755 --- a/ci/docker-run.sh +++ b/ci/docker-run.sh @@ -125,4 +125,4 @@ fi set -x # shellcheck disable=SC2086 -exec docker run "${ARGS[@]}" $CODECOV_ENVS "$IMAGE" "$@" +exec docker run "${ARGS[@]}" $CODECOV_ENVS -t "$IMAGE" "$@"