rust-lang / rust-lang/rust

confusing "'x.py' requires a subcommand but one was not provided" error

Open
#127,767 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-diagnostics T-bootstrap
Dominant language
Rust
Stars
119k
Forks
16.1k
PR merge metrics
PR metrics pending

Description

this error is printed not only when no subcommand is provided, but also when an invalid subcommand is provided.

example: ./x nonsensesubcommand or a typo like ./x fmtt.

either the error message should be changed to reflect the fact that it is printed in two situations, or these two situations should produce different error messages.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the x.py entry point and reproduce the two cases shown: ./x nonsensesubcommand and ./x fmtt. Trace where the message is selected; done means the error wording accurately distinguishes missing and invalid subcommands, or clearly covers both situations.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.