Skip to content

Commit e011c17

Browse files
owineclaude
andcommitted
Fix compose args validation regex syntax error
- Replace problematic character class with positive validation - Use separate patterns for single args and args with spaces - Fix bash conditional expression syntax error with character ranges - Use [[:space:]] instead of literal space in regex 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 7981a91 commit e011c17

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/deploy.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ jobs:
101101
exit 1
102102
fi
103103
# Validate against known docker compose options
104-
if [[ ! "$COMPOSE_ARGS" =~ ^[a-zA-Z0-9 _.-]*$ ]]; then
104+
if [[ "$COMPOSE_ARGS" =~ ^[a-zA-Z0-9_.-]+$ ]] || [[ "$COMPOSE_ARGS" =~ ^[a-zA-Z0-9_.-]+[[:space:]][a-zA-Z0-9_.-]+$ ]]; then
105+
echo "✅ Compose args format valid: $COMPOSE_ARGS"
106+
else
105107
echo "::error::Compose args contain invalid characters: $COMPOSE_ARGS"
106108
exit 1
107109
fi

0 commit comments

Comments
 (0)