diff --git a/.github/workflows/static_analysis.yaml b/.github/workflows/static_analysis.yaml index 36d4f3b7a3..62df9ea63a 100644 --- a/.github/workflows/static_analysis.yaml +++ b/.github/workflows/static_analysis.yaml @@ -71,8 +71,8 @@ jobs: - name: Provide correct exit status shell: bash run: | - ERROR_COUNT=$(grep cppcheck_run.log -e "severity=\"error\"" -c) - EXPECTED_ERROR_COUNT=$(grep .github/workflows/cppcheck_run.log -e "severity=\"error\"" -c) + ERROR_COUNT=$(grep cppcheck_run.log -e "severity=\"error\"" -c) || ERROR_COUNT=0 + EXPECTED_ERROR_COUNT=$(grep .github/workflows/cppcheck_run.log -e "severity=\"error\"" -c) || EXPECTED_ERROR_COUNT=0 if [ $ERROR_COUNT -eq $EXPECTED_ERROR_COUNT ] then echo "cppcheck_run succeeded, found" $ERROR_COUNT "errors, as expected"