Skip to content
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

pnpm completion command should not evaluate package.json packageManager field #7959

Open
2 of 4 tasks
davidjbng opened this issue Apr 18, 2024 · 0 comments
Open
2 of 4 tasks

Comments

@davidjbng
Copy link

Verify latest release

  • I verified that the issue exists in the latest pnpm release

pnpm version

No response

Which area(s) of pnpm are affected? (leave empty if unsure)

CLI, Operating System (Windows, MacOS, Linux)

Link to the code that reproduces this issue or a replay of the bug

No response

Reproduction steps

mkdir test && cd test
echo "{ \"packageManager\": \"npm@10.5.1\"}" > package.json
pnpm completion

pnpm --version
9.0.1

Describe the Bug

Running pnpm completion within a directory that has packageManager set to yarn or npm fails

Usage Error: This project is configured to use npm
$ pnpm ...

Usually you have the completion command in your shell init file. The completion script should be generated even if my current working directory is not a pnpm package.

Expected Behavior

The completion script is outputted.

Which Node.js version are you using?

20.12.2

Which operating systems have you used?

  • macOS
  • Windows
  • Linux

If your OS is a Linux based, which one it is? (Include the version if relevant)

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant