fix(ci): detect silent tool failures

This commit is contained in:
edde746
2026-07-12 08:42:19 +02:00
parent 048fb77c8c
commit d1a67828b6
2 changed files with 20 additions and 5 deletions
+7 -1
View File
@@ -52,7 +52,10 @@ jobs:
run: |
# Run flutter analyze
# Fails on errors or warnings only (info messages are allowed)
flutter analyze 2>&1 | tee analyze_output.txt || true
set +e
flutter analyze 2>&1 | tee analyze_output.txt
analyze_status=${PIPESTATUS[0]}
set -e
# Check output for errors or warnings
if grep -q "error •" analyze_output.txt; then
@@ -61,6 +64,9 @@ jobs:
elif grep -q "warning •" analyze_output.txt; then
echo "⚠️ Analysis completed with warnings"
exit 1
elif [ "$analyze_status" -ne 0 ] && ! grep -q "info •" analyze_output.txt; then
echo "❌ Analyzer failed before producing diagnostics (exit $analyze_status)"
exit "$analyze_status"
else
echo "✅ Analysis passed!"
exit 0