fix: add postinstall chmod for npm binary permissions#43
Merged
NathanFlurry merged 3 commits intomainfrom Feb 2, 2026
Merged
Conversation
|
🚅 Deployed to the sandbox-agent-pr-43 environment in sandbox-agent
|
The --version flag now reports the version from package.json instead of the version compiled into the Rust binary. This ensures the version matches what was installed via npm, even when binaries are reused from previous releases.
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
1 similar comment
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
054dfc2 to
93445b3
Compare
Instead of hacking around the version in the Node.js wrapper script, properly pass the version at build time via SANDBOX_AGENT_VERSION env var. Changes: - build.rs: Generate version.rs with VERSION constant from env var - main.rs: Use generated version constant for clap --version - Dockerfiles: Accept SANDBOX_AGENT_VERSION as build arg - build.sh: Pass version as second argument to Docker builds - release.yaml: Pass version to build script during CI - Remove version hack from sdks/cli/bin/sandbox-agent wrapper The version is now baked into the binary during the release build, ensuring --version reports the correct npm package version.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a postinstall script to make the binary executable after npm install.
This fixes the issue where the binary wasn't executable on Linux/macOS after installation.
Tested with:
docker run --rm node:22-slim sh -c "mkdir /test && cd /test && npm init -y && npm install @sandbox-agent/cli@0.1.4-rc.4 && ./node_modules/.bin/sandbox-agent --version"Output:
sandbox-agent 0.1.0