Skip to content

Subcommand matching logic error #35

Closed

Description

@zuixinwang

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

Activity

  1. nozomuikuta commented on May 25, 2023

    @nozomuikuta
    Member

    @zuixinwang

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

  2. zuixinwang commented on May 25, 2023

    @zuixinwang
    ContributorAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions