Do not suggest --package when --backend is used, but --build-backend (#10958)

## Summary

Closes #8743

## Test Plan

Snapshot tests
This commit is contained in:
Sede Soukossi 2025-01-29 23:15:05 +01:00 committed by GitHub
parent ae76a4b7f5
commit d5461d8d34
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 43 additions and 0 deletions

View file

@ -2590,6 +2590,16 @@ pub struct InitArgs {
#[arg(long, value_enum, conflicts_with_all=["script", "no_package"])]
pub build_backend: Option<ProjectBuildBackend>,
/// Invalid option name for build backend.
#[arg(
long,
required(false),
action(clap::ArgAction::SetTrue),
value_parser=clap::builder::UnknownArgumentValueParser::suggest_arg("--build-backend"),
hide(true)
)]
backend: Option<String>,
/// Do not create a `README.md` file.
#[arg(long)]
pub no_readme: bool,