diff --git a/.gitea/scripts/sop-tier-check.sh b/.gitea/scripts/sop-tier-check.sh index d1bd2c235..7063ee3fb 100755 --- a/.gitea/scripts/sop-tier-check.sh +++ b/.gitea/scripts/sop-tier-check.sh @@ -363,6 +363,10 @@ _passed_clauses="" _failed_clauses="" for _raw_clause in $EXPR; do + # Skip operator tokens produced by bash word-splitting on spaces. + # The expression "managers AND engineers" splits into three tokens; + # without this guard "AND" is evaluated as a literal team name. + [ "$_raw_clause" = "AND" ] || [ "$_raw_clause" = "OR" ] && continue # Normalise: strip parens, replace commas with spaces so bash word-split # can iterate the OR-set members. The previous form # _clause=$(echo ... | tr ',' '\n' | tr -d '[:space:]' | grep -v '^$')