Skip to content
This repository was archived by the owner on Aug 31, 2023. It is now read-only.

Commit

Permalink
fix: apply chmod at pkg creation time (#3800)
Browse files Browse the repository at this point in the history
Fixes #3799
  • Loading branch information
castarco authored Nov 21, 2022
1 parent c39ee57 commit bfe0212
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
1 change: 1 addition & 0 deletions npm/rome/scripts/generate-packages.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ function generateNativePackage(platform, arch) {

console.log(`Copy binary ${binaryTarget}`);
fs.copyFileSync(binarySource, binaryTarget);
fs.chmodSync(binaryTarget, 0o755);
}

function updateWasmPackage(target) {
Expand Down
11 changes: 0 additions & 11 deletions npm/rome/scripts/postinstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,6 @@ if (binName) {
`The Rome CLI postinstall script failed to resolve the binary file "${binName}". Running Rome from the npm package will probably not work correctly.`,
);
}

if (binPath) {
try {
require("fs").chmodSync(binPath, 0o755);
} catch {
console.warn(
"The Rome CLI postinstall script failed to set execution permissions to the native binary. " +
"Running Rome from the npm package will probably not work correctly.",
);
}
}
} else {
console.warn(
"The Rome CLI package doesn't ship with prebuilt binaries for your platform yet. " +
Expand Down

0 comments on commit bfe0212

Please sign in to comment.