Skip to content

Commit 2339605

Browse files
evallespbrjackma
authored andcommitted
Fix check-role-prefix pattern regexp
It seems backlash was creating ambiguity, as different regex engines handle this different. Now is using special positioning rule technique. Signed-off-by: Enrique Vallespi Gil <[email protected]>
1 parent 29b561f commit 2339605

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/check-role-prefix.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ ROLE_COUNT=$(echo "$CHANGED_ROLES" | tr '|' '\n' | wc -l)
2525

2626
if [ "$ROLE_COUNT" -eq 1 ]; then
2727
# shellcheck disable=SC1087
28-
PATTERN="^[\[(]$CHANGED_ROLES[\])]"
28+
PATTERN="^[[(]$CHANGED_ROLES[])]"
2929
else
30-
PATTERN="^[\[(](multiple)[\])]"
30+
PATTERN="^[[(]multiple[])]"
3131
fi
3232

3333
if ! grep -qE "$PATTERN" <<<"$MSG"; then

0 commit comments

Comments
 (0)