-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Post-installed binary losing executable permissions on reinstall #8546
Labels
Comments
Possibly related to #7746 |
PR: #8625 |
zkochan
added a commit
that referenced
this issue
Oct 10, 2024
zkochan
added a commit
that referenced
this issue
Oct 12, 2024
You need to use this setting: https://pnpm.io/package_json#publishconfigexecutablefiles |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Verify latest release
pnpm version
No response
Which area(s) of pnpm are affected? (leave empty if unsure)
Store
Link to the code that reproduces this issue or a replay of the bug
No response
Reproduction steps
Dockerfile
package.json
docker-entrypoint.sh
docker build -t pnpm-issue -f Dockerfile . docker run --rm -it pnpm-issue
Describe the Bug
As the Node.js Language Owner at Heroku, this bug came to my attention when the following issue was filed as developers were trying to take advantage of our recent support for pnpm:
heroku/heroku-buildpack-nodejs#1247
After some investigation, what I've noticed is that this bug seems to be triggered by the following conditions:
postinstall
script0077
Using
@sentry/cli
, as in the reproduction above, what happens is:pnpm install
,@sentry/cli
executes which downloads the architecture-specific binarypnpm install
(after thenode_modules
dir is removed),@sentry/cli
module is restored from the storeExpected Behavior
I would expect that if a file is installed with executable permissions as part of a
postinstall
script, then when it's installed from the pnpm store it should also have executable permissions.The
sideEffects
information recorded for the@sentry/cli
module from above seems to indicate this as themode
stored has a value of33216
(octal100700
).The current workaround I've been recommending is to disable the side-effects-cache.
Which Node.js version are you using?
20.17.0
Which operating systems have you used?
If your OS is a Linux based, which one it is? (Include the version if relevant)
Ubuntu 20.04, Alpine Linux v3.20
The text was updated successfully, but these errors were encountered: