From 4b79e6141b57df01e18a9cd229b517e54d5d0b3a Mon Sep 17 00:00:00 2001 From: Sam Johnson Date: Fri, 9 Aug 2024 07:13:49 -0400 Subject: [PATCH] try again --- .github/workflows/check-rust.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check-rust.yml b/.github/workflows/check-rust.yml index 9925bb86..b3e656c3 100644 --- a/.github/workflows/check-rust.yml +++ b/.github/workflows/check-rust.yml @@ -162,12 +162,11 @@ jobs: # regular cargo check is sufficient here as we only need to trigger the build script # which will nevertheless check the whole workspace run: | - set -e # Fail the script if any command fails + set -o pipefail # Ensure the pipeline fails if any command in the pipeline fails cargo check 2>&1 | tee build_output.log - warnings=$(grep "^warning:" build_output.log || true) - if [ -n "$warnings" ]; then + if grep -q "^warning:" build_output.log; then echo "Build emitted the following warnings:" - echo "$warnings" + grep "^warning:" build_output.log exit 1 else echo "No warnings found."