refactor: keep embedded builder as startup shell (#3665)

This commit is contained in:
安正超
2026-06-20 22:17:31 +08:00
committed by GitHub
parent 150ac967d3
commit 6d13a0f15a
5 changed files with 116 additions and 46 deletions
+2 -1
View File
@@ -11,7 +11,8 @@ status=0
while IFS=: read -r file line _; do
start=$((line > 3 ? line - 3 : 1))
end=$((line + 6))
if ! sed -n "${start},${end}p" "$file" | rg -q "SAFETY:"; then
window="$(sed -n "${start},${end}p" "$file")"
if ! rg -q "SAFETY:" <<<"$window"; then
printf '%s:%s: unsafe_code allowance must have a nearby SAFETY comment\n' "$file" "$line" >&2
status=1
fi