Skip to content

fix: make bunx available in sandbox and auto-start gpg-agent - #32

Merged
malaporte merged 2 commits into
mainfrom
missing-bunx
Apr 13, 2026
Merged

malaporte merged 2 commits into
mainfrom
missing-bunx

Conversation

@malaporte

Copy link
Copy Markdown
Owner

Summary

Two small fixes to improve the default sandbox experience: symlink bunx alongside bun in the default image, and automatically start gpg-agent on the host when it isn't running at sandbox start time.

Changes

  • src/cli/default-dockerfile.ts: add ln -sf /root/.bun/bin/bunx /usr/local/bin/bunx so bunx is available in the sandbox by default (mirrors the existing bun symlink)
  • src/cli/sandbox.ts: in resolveGpgSocketInfo, when gpgconf returns a socket path but the file doesn't exist yet, run gpg-agent --daemon once and wait up to 500 ms for the socket to appear — eliminating the spurious warning for users whose agent simply wasn't running yet

Testing

  • bun run typecheck — clean
  • bun run test — 139/139 passing
  • bun run build — all platform binaries compile successfully

Reviewer Notes

  • gpg-agent --daemon is idempotent; if the agent is already running it exits with a non-zero code which is silently ignored.
  • The 500 ms busy-wait uses Atomics.wait in 50 ms slices to stay synchronous — in practice the socket appears within one iteration.
  • The warning is still emitted if gpg-agent genuinely cannot be started or the socket never materialises after the timeout.

@malaporte
malaporte marked this pull request as ready for review April 13, 2026 06:52
@malaporte
malaporte merged commit b986a06 into main Apr 13, 2026
2 checks passed
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 0.20.4 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant