Pin setup-bun binary for post-steps by kiwigitops · Pull Request #1365 · anthropics/claude-code-action (original) (raw)
Fixes #1363.
When allowed_non_write_users is enabled, the action pins a Bun binary for post-steps before it prepends system bin directories to PATH. That pin currently uses command -v bun, which can copy a runner-provided shim instead of the Bun binary installed by oven-sh/setup-bun.
This gives the setup-bun step an id and pins from explicit paths first:
path_to_bun_executable, when the caller provides onesteps.setup-bun.outputs.bun-path, for the action-installed Buncommand -v bunonly as a fallback
That keeps post-steps on the same Bun binary the action selected, even when /usr/bin/bun exists later in PATH.
Tested:
python -c "import yaml, pathlib; yaml.safe_load(pathlib.Path('action.yml').read_text()); print('yaml ok')"npx prettier --check action.yml- pinning-loop smoke checks for setup-bun path precedence and custom Bun path precedence
git diff --check