Skip to content

Subcommand matching logic error #35

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

Closed
zuixinwang opened this issue May 24, 2023 · 2 comments · Fixed by #58
Closed

Subcommand matching logic error #35

zuixinwang opened this issue May 24, 2023 · 2 comments · Fixed by #58

Comments

@zuixinwang
Copy link
Contributor

Environment

18.16.0

Reproduction

I have added a new subcommand named undefined in playground/cli.ts. Still, when I execute pnpm play without extra parameters, the console does not prompt that the command was not found but instead executes the undefined subcommand I defined.

I have checked the source code and am not sure why the "&& !cmd.run" condition is required here

Describe the bug

I have added a new subcommand named undefined in playground/cli.ts. Still, when I execute pnpm play without extra parameters, the console does not prompt that the command was not found but instead executes the undefined subcommand I defined.

I have checked the source code and am not sure why the "&& !cmd.run" condition is required here

Additional context

No response

Logs

No response

@nozomuikuta
Copy link
Member

@zuixinwang

Would you provide a minimal reproduction so that everyone can understand your issue more clearly?

@zuixinwang
Copy link
Contributor Author

zuixinwang commented May 25, 2023

Yes, here is the reproduction link. 🐶 @nozomuikuta

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

Successfully merging a pull request may close this issue.

2 participants