Skip to content

Commit 433f1b6

Browse files
ajuste analise do diff
1 parent aec28cf commit 433f1b6

1 file changed

Lines changed: 14 additions & 8 deletions

File tree

entrypoint.sh

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,9 @@ check_blocking_rules() {
203203
cat "$CHANGED_FILES_CACHE" 2>/dev/null || echo "(cache vazio)"
204204
echo ""
205205

206-
echo "$p1_violations" | while IFS=: read -r file line rest; do
206+
found_blocking=0
207+
208+
while IFS=: read -r file line rest; do
207209
[ -z "$file" ] && continue
208210
file_matches_filter "$file" || continue
209211

@@ -213,20 +215,24 @@ check_blocking_rules() {
213215
if is_changed "$file" ""; then
214216
echo "$file (file-level): $rest"
215217
echo ""
216-
echo "💡 Corrija as violações ou use o bypass autorizado."
217-
exit 1
218+
found_blocking=1
219+
break
218220
fi
219221
else
220222
if is_changed "$file" "$line"; then
221223
echo "$file:$line: $rest"
222224
echo ""
223-
echo "💡 Corrija as violações ou use o bypass autorizado."
224-
exit 1
225+
found_blocking=1
226+
break
225227
fi
226228
fi
227-
done
228-
229-
if [ $? -eq 1 ]; then
229+
done <<EOF
230+
$p1_violations
231+
EOF
232+
233+
if [ $found_blocking -eq 1 ]; then
234+
echo ""
235+
echo "💡 Corrija as violações ou use o bypass autorizado."
230236
exit 1
231237
fi
232238

0 commit comments

Comments
 (0)