Skip to content

fix bash 3 incompatibilities to allow tests to run on macOS#79

Merged
labkey-willm merged 1 commit into
developfrom
fb_bash3_compat
Jun 11, 2026
Merged

fix bash 3 incompatibilities to allow tests to run on macOS#79
labkey-willm merged 1 commit into
developfrom
fb_bash3_compat

Conversation

@labkey-willm

@labkey-willm labkey-willm commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Replaces ${var^^} (bash 4+ uppercase expansion) in _skip_step with tr '[:lower:]' '[:upper:]' — affects install-labkey.bash, install-wcp.bash, and test/test_internals.sh
  • Adds a fallback to 1024M in step_default_envs when free (Linux-only) is not available
  • Replaces ${var::-7} / ${var::-16} (bash 4+ negative substring) with ${var%.tar.gz} / ${var%-embedded.tar.gz}

Test plan

  • ./test/runner.sh passes locally on macOS
  • CI passes (Ubuntu, bash 5 — behaviour unchanged)

🤖 Generated with Claude Code

Three bash 4+ constructs broke test runs on macOS (bash 3.2):

- `${var^^}` (uppercase expansion) in _skip_step and test_internals.sh
  replaced with `tr '[:lower:]' '[:upper:]'`
- `free -m` (Linux-only memory command) in step_default_envs
  now falls back to 1024M when free is not available
- `${var::-7}` (negative-offset substring) replaced with
  `${var%.tar.gz}` and `${var%-embedded.tar.gz}` throughout

CI (Ubuntu, bash 5) is unaffected. These changes make the test suite
runnable locally on macOS without requiring homebrew bash.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@labkey-willm labkey-willm merged commit 6d485e0 into develop Jun 11, 2026
7 checks passed
@labkey-willm labkey-willm deleted the fb_bash3_compat branch June 11, 2026 23:42
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.

2 participants