You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/workflows/partials-audit.yml
+3-4Lines changed: 3 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,6 @@ jobs:
38
38
FILENAME=${TEMP_PATH%.mdx}
39
39
40
40
# Construct the individual search strings for product and file
41
-
# We escape the quotes to ensure they are treated as part of the string.
42
41
SEARCH_PRODUCT="product=\"$PRODUCT\""
43
42
SEARCH_FILE="file=\"$FILENAME\""
44
43
@@ -49,9 +48,9 @@ jobs:
49
48
echo " - SEARCH_FILE: $SEARCH_FILE"
50
49
# --- END LOGGING ---
51
50
52
-
# Use Perl to search for a multi-line <Render> component with both values.
53
-
# The entire logic is now in a single `-e` block, fixing the syntax error.
54
-
if ! perl -ne "exit 0 if /<Render.*?(?:\s|)$SEARCH_PRODUCT.*?(?:\s|)$SEARCH_FILE.*?\/?\>/s; exit 1" ./*/*.mdx; then
51
+
# Use Perl to search for a multi-line <Render> component with both values, regardless of order.
52
+
# The logical 'or' operator checks for both argument sequences.
53
+
if ! perl -ne "exit 0 if (/<Render.*?(?:\s|)$SEARCH_PRODUCT.*?(?:\s|)$SEARCH_FILE.*?\/?\>/s or /<Render.*?(?:\s|)$SEARCH_FILE.*?(?:\s|)$SEARCH_PRODUCT.*?\/?\>/s); exit 1" ./*/*.mdx; then
0 commit comments