mirror of
https://github.com/kanidm/kanidm.git
synced 2025-02-23 20:47:01 +01:00
checks for a minimum number of arguments (#1452)
This commit is contained in:
parent
73821d0a6b
commit
d26bef17b6
|
@ -36,6 +36,7 @@ pub struct CommonOpt {
|
||||||
#[derive(Debug, Args)]
|
#[derive(Debug, Args)]
|
||||||
pub struct GroupNamedMembers {
|
pub struct GroupNamedMembers {
|
||||||
name: String,
|
name: String,
|
||||||
|
#[clap(required=true,min_values=1)]
|
||||||
members: Vec<String>,
|
members: Vec<String>,
|
||||||
#[clap(flatten)]
|
#[clap(flatten)]
|
||||||
copt: CommonOpt,
|
copt: CommonOpt,
|
||||||
|
@ -717,7 +718,7 @@ pub enum PwBadlistOpt {
|
||||||
Upload {
|
Upload {
|
||||||
#[clap(flatten)]
|
#[clap(flatten)]
|
||||||
copt: CommonOpt,
|
copt: CommonOpt,
|
||||||
#[clap(parse(from_os_str))]
|
#[clap(parse(from_os_str),required=true,min_values=1)]
|
||||||
paths: Vec<PathBuf>,
|
paths: Vec<PathBuf>,
|
||||||
/// Perform a dry run and display the list that would have been uploaded instead.
|
/// Perform a dry run and display the list that would have been uploaded instead.
|
||||||
#[clap(short = 'n', long)]
|
#[clap(short = 'n', long)]
|
||||||
|
@ -729,7 +730,7 @@ pub enum PwBadlistOpt {
|
||||||
Remove {
|
Remove {
|
||||||
#[clap(flatten)]
|
#[clap(flatten)]
|
||||||
copt: CommonOpt,
|
copt: CommonOpt,
|
||||||
#[clap(parse(from_os_str))]
|
#[clap(parse(from_os_str), required=true, min_values=1)]
|
||||||
paths: Vec<PathBuf>,
|
paths: Vec<PathBuf>,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue