Skip to content

Commit 4526fc8

Browse files
vaindclaude
andcommitted
fix: Correct regex character class syntax for hyphens
Move hyphens to the end of character classes in regex patterns to ensure they are treated as literal characters rather than ranges. This fixes validation failures for inputs containing hyphens like "WORKFLOW-TEST-DEPENDENCY-DO-NOT-MERGE". 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 71bc194 commit 4526fc8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/updater.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
- name: Validate dependency name
7979
run: |
8080
# Validate that inputs.name contains only safe characters
81-
if [[ ! "${{ inputs.name }}" =~ ^[a-zA-Z0-9_\-\./@[:space:]]+$ ]]; then
81+
if [[ ! "${{ inputs.name }}" =~ ^[a-zA-Z0-9_\./@[:space:]-]+$ ]]; then
8282
echo "::error::Invalid dependency name: '${{ inputs.name }}'. Only alphanumeric characters, spaces, and _-./@ are allowed."
8383
exit 1
8484
fi
@@ -87,7 +87,7 @@ jobs:
8787
- name: Validate dependency path
8888
run: |
8989
# Validate that inputs.path contains only safe characters
90-
if [[ ! "${{ inputs.path }}" =~ ^[a-zA-Z0-9_\-\./]+$ ]]; then
90+
if [[ ! "${{ inputs.path }}" =~ ^[a-zA-Z0-9_\./-]+$ ]]; then
9191
echo "::error::Invalid dependency path: '${{ inputs.path }}'. Only alphanumeric characters and _-./ are allowed."
9292
exit 1
9393
fi

0 commit comments

Comments
 (0)