dotCMS / dotCMS/core

[CI/CD] Nightly macOS CLI build fails — SDKMAN 5.21.0 requires Bash 4+

Open Beginner friendly
#35,004 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area : CI/CD Bug stale Team : Enablement
Dominant language
Java
Stars
970
Forks
486
Avg merge
3d 33m
Merged PRs (30d)
170

Description

Summary

The Nightly CLI Build / Build native image on macOS-Silicon job fails because SDKMAN 5.21.0 (released 2026-03-14) added a Bash version check that rejects Bash 3.x. The macos-14-arm64 GitHub Actions runner ships with Apple's system Bash 3.2.57, which Apple will not upgrade past 3.x due to GPL v3 licensing.

No code change caused this — it is purely an upstream SDKMAN version bump.

Failed Run

Root Cause

  1. SDKMAN 5.21.0 installer (https://get.sdkman.io) added a Bash 4+ version check that exit 1s on Bash 3.x.
  2. The setup-java action (.github/actions/core-cicd/setup-java/action.yml line 67) runs curl -s "https://get.sdkman.io" | bash with shell: bash.
  3. On macos-14-arm64, bash resolves to /bin/bash (Apple's system Bash 3.2.57). Homebrew has Bash 5.x at /opt/homebrew/bin/bash but the shell: bash directive uses the system one.
  4. The SDKMAN cache (macOS-arm64-sdkman-install) expired between the Mar 16 (success) and Mar 17 (failure) nightly runs, triggering a fresh install that hit the new check.

Timeline

Date Event
2026-03-14 SDKMAN 5.21.0 released with Bash 4+ requirement
2026-03-16 Nightly succeeds — SDKMAN cache still valid
2026-03-17 Nightly fails — cache expired, fresh install hits Bash 4+ check

Recommended Fix

In .github/actions/core-cicd/setup-java/action.yml, change the SDKMAN install step to pipe through zsh instead of bash (this is SDKMAN's own recommendation in the error message):

- name: Install SDKMan
  id: install-sdkman
  if: ${{ steps.restore-cache-sdkman.outputs.cache-hit != 'true' }}
  shell: bash
  run: |
    if [ ! -f "$HOME/.sdkman/bin/sdkman-init.sh" ]; then
    echo "Downloading SDKMAN install"
    curl -s "https://get.sdkman.io" | zsh
    fi

This is a one-line change (| bash| zsh). The zsh shipped on macOS satisfies SDKMAN's requirements.

Alternatives
  • Option B: Change the step's shell: to zsh {0} — works but changes more shell behavior
  • Option C: Use /opt/homebrew/bin/bash — Bash 5.x, but path may not be stable across runner image updates

Impact

  • Blocks all macOS native CLI builds whenever the SDKMAN cache is cold
  • Will recur on every nightly/PR/merge-queue run that triggers the macOS CLI job after cache expiry
  • No workaround short of the fix

🤖 Generated with Claude Code

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

In .github/actions/core-cicd/setup-java/action.yml around line 67, inspect the Install SDKMan step and its shell commands. Update the SDKMAN install pipe as described, then verify the Nightly CLI Build / Build native image on macOS-Silicon job with a cold SDKMAN cache on macos-14-arm64; done means SDKMAN installation succeeds.

Written by the indexing model from the issue text.

Assessment

Tech stack
bash, github-actions, zsh
Domain
build-system, ci-cd, cli
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.