Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/fix-binary-permissions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"agent-browser": patch
---

Fix binary permissions on install. npm doesn't preserve execute bits, so postinstall now ensures the native binary is executable.
6 changes: 5 additions & 1 deletion scripts/postinstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ async function downloadFile(url, dest) {
async function main() {
// Check if binary already exists
if (existsSync(binaryPath)) {
console.log(`✓ Native binary already exists: ${binaryName}`);
// Ensure binary is executable (npm doesn't preserve execute bit)
if (platform() !== 'win32') {
chmodSync(binaryPath, 0o755);
}
console.log(`✓ Native binary ready: ${binaryName}`);
return;
}

Expand Down