-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Self-service
- I'd be willing to implement a fix
Describe the bug
Yarn, when using the node-modules linker, when adding a missing dependency, does not properly set the executable bit for the files defined in the bin directive.
To reproduce
- add a package like protobufjs-cli to your package.json
- run
yarn install - note the file node_modules/protobufj-cli/pbjs is marked executable
- remove the protobufjs-cli from node_modules (i.e. via
rm -rf node_modules/protobufjs-cli) - run
yarn install - note the file node_modules/protobufj-cli/pbjs is NOT marked executable
Environment
System:
OS: macOS 13.2.1
CPU: (10) arm64 Apple M1 Pro
Binaries:
Node: 18.15.0 - /private/var/folders/n1/3jwsrn0j1h17qckdb157pdjw0000gn/T/xfs-17b29353/node
Yarn: 3.5.0 - /private/var/folders/n1/3jwsrn0j1h17qckdb157pdjw0000gn/T/xfs-17b29353/yarn
npm: 9.5.0 - ~/.volta/tools/image/node/18.15.0/bin/npmAdditional context
➜ cat .yarnrc.yml
nodeLinker: node-modules
yarnPath: .yarn/releases/yarn-3.5.0.cjs
➜ yarn
➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed
➤ YN0000: ┌ Link step
➤ YN0000: └ Completed
➤ YN0000: Done in 0s 93ms
➜ ll node_modules/protobufjs-cli/bin
total 16
-rwxr-xr-x 1 username staff 203 Mar 24 15:21 pbjs
-rwxr-xr-x 1 username staff 203 Mar 24 15:21 pbts
➜ rm -rf node_modules/protobufjs-cli
➜ yarn
➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed
➤ YN0000: ┌ Link step
➤ YN0000: └ Completed
➤ YN0000: Done in 0s 113ms
➜ ll node_modules/protobufjs-cli/bin
total 16
-rw-r--r-- 1 username staff 203 Mar 24 15:22 pbjs
-rw-r--r-- 1 username staff 203 Mar 24 15:22 pbts
➜ yarn --version
3.5.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working