fix(ci): detect silent tool failures
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user