Skip to content

fix(e2e): replace bash-specific [[ with POSIX-compatible alternatives#355

Open
whg517 wants to merge 1 commit into
zncdatadev:mainfrom
whg517:fix/posix-sh-compat-in-e2e-tests
Open

fix(e2e): replace bash-specific [[ with POSIX-compatible alternatives#355
whg517 wants to merge 1 commit into
zncdatadev:mainfrom
whg517:fix/posix-sh-compat-in-e2e-tests

Conversation

@whg517
Copy link
Copy Markdown
Member

@whg517 whg517 commented May 14, 2026

Chainsaw uses /usr/bin/sh (dash). Replace [[ regex and glob with grep -qE and grep -qF.

Chainsaw executes scripts with /usr/bin/sh (dash on Ubuntu), which does
not support [[. Replace:
- [[ "$VAR" =~ ^[0-9]+$ ]] -> echo "$VAR" | grep -qE '^[0-9]+$'
- [[ $tls_san != *$check* ]] -> echo "$tls_san" | grep -qF "$check"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant