Skip to content

Unknown command reports "error: too many arguments. Expected 0 arguments but got 1" #84

@yashwanthkamana

Description

@yashwanthkamana

Hi! I hit an issue when running an unknown command. The error message appears
to be about arguments rather than an unknown command.

Steps to reproduce

  1. Create a Pastel app with a single index command (no subcommands).
  2. Run an unknown command:
my-cli does-not-exist

Expected

An "unknown command" error (and/or a list of available commands).

Actual

error: too many arguments. Expected 0 arguments but got 1

Why this matters

This looks like a misclassification of the error, so users get a confusing
message that suggests they passed too many args instead of an invalid command.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions