Skip to content

Commit 3b6d999

Browse files
committed
fix: use [[:space:]] instead of \s for macOS bash 3.2 compatibility
macOS ships bash 3.2 which does not support \s in =~ regex patterns. Replace with POSIX [[:space:]] which works on all platforms. https://claude.ai/code/session_01Y8NseCm28GqE8nQ1Yvg5aa
1 parent 86853c4 commit 3b6d999

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

.github/workflows/setup-stackql-test.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,15 @@ jobs:
4242
echo "${{ env.registry_list_output }}"
4343
4444
# Validate header row: expect | provider | and | version | columns
45-
HEADER_REGEX='\|\s*provider\s*\|\s*version\s*\|'
45+
# Use [[:space:]] instead of \s for macOS bash 3.2 compatibility
46+
HEADER_REGEX='\|[[:space:]]*provider[[:space:]]*\|[[:space:]]*version[[:space:]]*\|'
4647
if ! [[ "${{ env.registry_list_output }}" =~ $HEADER_REGEX ]]; then
4748
echo "Registry list header does not match expected format"
4849
exit 1
4950
fi
5051
5152
# Validate at least one data row: | <name> | v<major>.<minor>.<patch> |
52-
DATA_ROW_REGEX='\|\s*[a-z][a-z0-9_]*\s*\|\s*v[0-9]+\.[0-9]+\.[0-9]+\s*\|'
53+
DATA_ROW_REGEX='\|[[:space:]]*[a-z][a-z0-9_]*[[:space:]]*\|[[:space:]]*v[0-9]+\.[0-9]+\.[0-9]+[[:space:]]*\|'
5354
if ! [[ "${{ env.registry_list_output }}" =~ $DATA_ROW_REGEX ]]; then
5455
echo "Registry list does not contain a valid data row"
5556
exit 1

0 commit comments

Comments
 (0)