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

Incorrect Error Message When Workspace Root Command Not Found #7244

Closed
3 of 4 tasks
shellscape opened this issue Oct 25, 2023 · 2 comments · Fixed by #7370
Closed
3 of 4 tasks

Incorrect Error Message When Workspace Root Command Not Found #7244

shellscape opened this issue Oct 25, 2023 · 2 comments · Fixed by #7370

Comments

@shellscape
Copy link
Contributor

Verify latest release

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

pnpm version

8.*

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

CLI

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

https://github.com/rollup/plugins/actions/runs/6644527027/job/18053872346#step:15:31

Reproduction steps

To reproduce, attempt to call a workspace root script with an incorrect or nonexistent script name. e.g. pnpm --workspace-root batman:smells

Describe the Bug

The CLI will produce an incorrect error message:

ERR_PNPM_RECURSIVE_EXEC_FIRST_FAIL  Command "--workspace-root" not found

This looks like a holdover from before pnpm moved the order of pnpm-flags and removed the -- for script parameter passing.

Expected Behavior

The CLI should produce a message with the correct erroneous script name:

ERR_PNPM_RECURSIVE_EXEC_FIRST_FAIL  Command "batman:smellst" not found

Which Node.js version are you using?

20.4.0

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)

Ubuntu

@JasonMan34
Copy link
Contributor

For a quick fix, use pnpm run -w foo explicitly over pnpm -w foo

zkochan added a commit that referenced this issue Dec 6, 2023
close #7244

---------

Co-authored-by: Zoltan Kochan <z@kochan.io>
@shellscape
Copy link
Contributor Author

Thanks @zkochan!

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

Successfully merging a pull request may close this issue.

2 participants