Skip to content

fix(plugin): fall back to shasum when sha256sum is missing (macOS) - #15

Merged
unohee merged 1 commit into
masterfrom
fix/bootstrap-shasum
Oct 25, 2026
Merged

unohee merged 1 commit into
masterfrom
fix/bootstrap-shasum

Conversation

@unohee

@unohee unohee commented Oct 25, 2026

Copy link
Copy Markdown
Contributor

Why

scripts/claude-plugin/bootstrap.sh hashes its stamp with sha256sum. macOS ships shasum instead, and has no sha256sum unless coreutils is installed. On such a Mac the SessionStart hook fails with sha256sum: command not found (exit 127), and the plugin cannot build its environment.

What

Use sha256sum when it is present, else shasum -a 256. Both print the same digest.

Verified

tests/test_claude_plugin.py runs the script with PATH=/usr/bin:/bin. It now passes in full on macOS: 14/14, where 2 failed before. Its stamp check compares against hashlib, so the digest is unchanged.

bootstrap.sh hashed its stamp with sha256sum, which macOS does not ship
unless coreutils is installed; the SessionStart hook then failed with
'sha256sum: command not found' (exit 127) and the plugin could not build its
environment. Use sha256sum when present, else shasum -a 256: same digest.

tests/test_claude_plugin.py, which runs the script with PATH=/usr/bin:/bin,
now passes in full on macOS (it failed 2 of 14 before); its stamp check
compares against hashlib, so the digest is unchanged.
@unohee
unohee merged commit f9cbddc into master Oct 25, 2026
4 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