Skip to content

Fix Windows portability of settings.xml hash in multiple-distributions test (#945 follow-up)#7

Merged
brunoborges merged 1 commit into
mainfrom
brunoborges-multiple-jdk-workaround-test
Jul 15, 2026
Merged

Fix Windows portability of settings.xml hash in multiple-distributions test (#945 follow-up)#7
brunoborges merged 1 commit into
mainfrom
brunoborges-multiple-jdk-workaround-test

Conversation

@brunoborges

Copy link
Copy Markdown
Owner

Why

Follow-up to #6, which merged just before its Windows CI finished. The stacked-distributions job failed on windows-latest:

Record settings.xml written by the first step
  line 7: shasum: command not found   (exit 127)

shasum isn't on PATH in git-bash on Windows runners, so the byte-for-byte settings.xml comparison couldn't run. The buggy lines are currently live on main (multiple-distributions.yml:106 and :166), so the Windows leg fails on main too.

Fix

Replace the direct shasum -a 256 calls with a small portable SHA-256 helper that works on Ubuntu, macOS and Windows git-bash, trying sha256sumshasum -a 256openssl dgst -sha256 in order. The assertion is unchanged — settings.xml is still verified byte-for-byte unchanged by the second setup-java step; only the hashing mechanism is made cross-platform. No assertions were weakened or skipped.

Classification: pr-caused (Windows/git-bash portability bug introduced by #6).

Validation

  • YAML parses; actionlint + shellcheck clean.
  • workflow_dispatch run on this branch passed on all three OSes, including windows-latest.

Use a cross-platform SHA-256 helper for settings.xml snapshots so the stacked-distributions workflow works under Windows git-bash, where shasum is not available.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@brunoborges
brunoborges merged commit dc979ff into main Jul 15, 2026
99 checks passed
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