yarnpkg / berry

📦🐈 Active development trunk for Yarn ⚒
https://yarnpkg.com
BSD 2-Clause "Simplified" License
7.42k stars 1.11k forks source link

[Bug?]: pnpm linker doesn't expose binaries in pre-commit hook #3644

Open FezVrasta opened 3 years ago

FezVrasta commented 3 years ago

Self-service

Describe the bug

Have a package, such as lint-staged, at the root of your workspace running Yarn 3.1. Once yarn install is ran, if you execute a script from a Git hook such as pre-commit, I get a command not found error:

$ cat package.json
{
  "scripts": {
    "lint-staged": "lint-staged"
  },
  "pre-commit": [
    "lint-staged"
  ],
  "dependencies": {
    "lint-staged": "*",
    "pre-commit": "*"
  }
}

$ git commit -m "test"
sh: lint-staged: command not found

Running yarn bin lint-staged I correctly get the binary path, but it's inside a .store folder, not the usual .bin one.

To reproduce

N/A

Environment

System:
    OS: macOS 11.6
    CPU: (4) x64 Intel(R) Core(TM) i5-4690 CPU @ 3.50GHz
  Binaries:
    Node: 14.18.1 - /usr/local/bin/node
    Yarn: 3.1.0-rc.13 - /usr/local/bin/yarn
    npm: 6.14.15 - /usr/local/bin/npm

Additional context

No response

yarnbot commented 2 years ago

Hi! 👋

This issue looks stale, and doesn't feature the reproducible label - which implies that you didn't provide a working reproduction using Sherlock. As a result, it'll be closed in a few days unless a maintainer explicitly vouches for it or you edit your first post to include a formal reproduction (you can use the playground for that).

Note that we require Sherlock reproductions for long-lived issues (rather than standalone git repositories or similar) because we're a small team. Sherlock gives us the ability to check which bugs are still affecting the master branch at any given point, and decreases the amount of code we need to run on our own machines (thus leading to faster bug resolutions). It helps us help you! 😃

If you absolutely cannot reproduce a bug on Sherlock (for example because it's a Windows-only issue), a maintainer will have to manually add the upholded label. Thanks for helping us triaging our repository! 🌟

FezVrasta commented 2 years ago

Not stale