@@ -48,16 +48,16 @@ jobs:
4848 exit 0
4949 fi
5050 # Disallowed chars: " : < > | * ?
51- OFFENDERS="$(find "$BUILD_DIR" -type f | grep -E '[\" :<>|*?]')" || true
51+ OFFENDERS="$(find "$BUILD_DIR" -type f | grep -E '[" :<>|*?]')" || true
5252 if [ -n "$OFFENDERS" ]; then
5353 echo "❌ Disallowed characters found in build artifact paths:"
5454 echo "$OFFENDERS"
55- # Annotate each offending path; show relative path from repo root
5655 while IFS= read -r p; do
57- # Normalize to repo-relative path
5856 rel="${p#$(pwd)/}"
5957 [ "$rel" = "$p" ] && rel="$p"
60- echo "::error file=${rel}::Disallowed character found in build artifact path (Pantheon rejects paths containing any of: \" : < > | * ?)"
58+ # Detect and print which character(s) caused it
59+ badchars=$(echo "$rel" | grep -oE '[" :<>|*?]' | tr -d '\n')
60+ echo "::error file=${rel}::Disallowed character(s) found in build artifact path: [${badchars}] (Pantheon rejects paths containing any of: \" : < > | * ?)"
6161 done <<< "$OFFENDERS"
6262 exit 1
6363 fi
@@ -94,10 +94,11 @@ jobs:
9494 if [ -n "$BAD_LINKS" ]; then
9595 echo "❌ Disallowed characters found in Markdown/MDX link targets:"
9696 echo "$BAD_LINKS"
97- # Emit GitHub annotations for each finding
97+ # Emit GitHub annotations for each finding (including exact bad char(s))
9898 while IFS=$'\t' read -r file line match; do
9999 [ -z "$file" ] && continue
100- echo "::error file=${file},line=${line}::Disallowed character in Markdown link target: ${match} (Not allowed: \" : < > | * ?)"
100+ badchars=$(echo "$match" | grep -oE '[" :<>|*?]' | tr -d '\n')
101+ echo "::error file=${file},line=${line}::Disallowed character(s) in Markdown link target: [${badchars}] ${match} (Not allowed: \" : < > | * ?)"
101102 done <<< "$BAD_LINKS"
102103 exit 1
103104 fi
0 commit comments