Open dylan-conway opened 2 months ago
Hi @dylan-conway Thanks, could you share the package.json configuration, specifically any bin fields setup? WIll help us to understand how the project is structured and if it has any influence on the installation behavior with .npmrc settings.
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
npm pack
will set files as executable if thebin
path is a subset of the file path.Expected Behavior
I expect
npm pack
to only mark files that are an exact match, or within the directory fromdirectories.bin
.Steps To Reproduce
./package.json
:./bin/index.js
:./src/bin/index.js
:Both are not executable
Run pack and display the contents of the tarball:
The output shows
./src/bin/index.js
is marked executable instead of./bin/index.js
Environment
//localhost:4873/:_authToken = (protected) always-auth = false registry = "http://localhost:4873/"
; node bin location = /opt/homebrew/Cellar/node/22.7.0/bin/node ; node version = v22.7.0 ; npm local prefix = /Users/dylan ; npm version = 10.8.3 ; cwd = /Users/dylan ; HOME = /Users/dylan ; Run
npm config ls -l
to show all defaults.