ci: skip symlinks in opengrep changed scan (#79930)

This commit is contained in:
Peter Steinberger
2026-05-10 06:35:41 +01:00
parent 5e874ed138
commit 2f8cb86381

View File

@@ -114,6 +114,14 @@ if (( PATHS_PASSED == 0 )); then
if (( CHANGED_ONLY )); then if (( CHANGED_ONLY )); then
SCAN_PATHS=() SCAN_PATHS=()
while IFS= read -r path; do while IFS= read -r path; do
# OpenGrep errors when an explicit changed path is a symlink; scan the
# real target content, not duplicate guide aliases such as CLAUDE.md.
if [[ -L "$path" ]]; then
continue
fi
if [[ ! -f "$path" && ! -d "$path" ]]; then
continue
fi
SCAN_PATHS+=( "$path" ) SCAN_PATHS+=( "$path" )
done < <( done < <(
{ {