-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
in-progressIssue is being actively worked onIssue is being actively worked onsafe-to-workSecurity triage: safe for automated processingSecurity triage: safe for automated processing
Description
Summary
sh/e2e/lib/provision.sh uses bash 4.x [[ regex matching which is incompatible with macOS bash 3.2, violating the project's shell compatibility requirements documented in CLAUDE.md.
Location
- File:
sh/e2e/lib/provision.sh - Line: 60
Issue Details
The code uses bash 4.x extended regex matching:
if [[ "${_env_line}" =~ ^export[[:space:]]+([A-Za-z_][A-Za-z0-9_]*)=\"(.*)\"$ ]]; then
export "${BASH_REMATCH[1]}"="${BASH_REMATCH[2]}"
fiAccording to CLAUDE.md:
macOS bash 3.x Compatibility
macOS ships bash 3.2. All scripts MUST work on it.
Impact
- Script will fail on macOS with bash 3.2
- Breaks the E2E test harness on macOS systems
- Violates documented compatibility requirements
Recommendation
Use POSIX-compatible pattern matching or case statement with glob patterns instead of [[ =~ ]].
Example fix:
case "${_env_line}" in
export\ *=\"*\")
# Extract variable name and value using sed/awk
;;
esacReferences
- CLAUDE.md shell script compatibility rules
- Issue fly/lib/common.sh: local var=$(cmd) masks exit code on macOS bash 3.2 #1571 (similar bash 3.2 compatibility fix)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
in-progressIssue is being actively worked onIssue is being actively worked onsafe-to-workSecurity triage: safe for automated processingSecurity triage: safe for automated processing