mirror of
https://github.com/pnpm/pnpm.git
synced 2026-01-06 22:18:17 -05:00
fix(exec): look for the executed command in the current dir first
This commit is contained in:
6
.changeset/chatty-roses-bow.md
Normal file
6
.changeset/chatty-roses-bow.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
"@pnpm/plugin-commands-script-runners": patch
|
||||
"pnpm": patch
|
||||
---
|
||||
|
||||
`pnpm exec` should look for the executed command in the `node_modules/.bin` directory that is relative to the current working directory. Only after that should it look for the executable in the workspace root.
|
||||
@@ -125,8 +125,8 @@ export async function handler (
|
||||
...process.env,
|
||||
...extraEnv,
|
||||
[PATH]: [
|
||||
...opts.extraBinPaths,
|
||||
path.join(opts.dir, 'node_modules/.bin'),
|
||||
...opts.extraBinPaths,
|
||||
process.env[PATH],
|
||||
].join(path.delimiter),
|
||||
PNPM_PACKAGE_NAME: opts.selectedProjectsGraph?.[prefix]?.package.manifest.name,
|
||||
|
||||
Reference in New Issue
Block a user