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
[cargo-nextest] Run tests when no subcommand is provided #800
Comments
Thanks for the report! Unfortunately that isn't really possible to do at the moment, since it's ambiguous whether a particular argument is a subcommand or the name of a test case. For example, does:
mean "run all tests with This is a mistake I made while initially defining the CLI -- what I should have done is always require you to specify
If we'd done that, we could have specified
However, this unfortunately isn't fixable without a breaking change. See also: #459. |
Hmm, thinking about this more: one thing we could do is that if no positional arguments are specified before edit: only applies to positional arguments |
Yeah, so we can support all of:
but not:
|
This solves my use case (no arguments), although I do think that, a separate issue, should address the 1.0 release interface, to polish the edges. |
(Note that we can continue to support options and flags like |
This is really tricky to do correctly with clap currently. I think I'm going to defer this. As a compromise, I've added Meanwhile you can add an alias to your |
Going to reopen this, since I think it's desirable eventually once clap has better support for it (clap-rs/clap#975). |
Problem
cargo nextest
fails as no subcommand is provided.Version
cargo-nextest-nextest 0.9.49
Use case
When combined with
cargo watch
nextest
is overly verbose:Solution
Default to
cargo nextest run
when no arguments are provided.The text was updated successfully, but these errors were encountered: