Print help when subcommand is given without arguments #498

Merged
Plume_migration_agent merged 1 commit from plm/help into master 2019-03-21 22:25:22 +00:00
3 changed files with 3 additions and 0 deletions

View file

@ -33,6 +33,7 @@ pub fn run<'a>(args: &ArgMatches<'a>, conn: &Connection) {
let conn = conn;
match args.subcommand() {
("new", Some(x)) => new(x, conn),
("", None) => command().print_help().unwrap(),
_ => println!("Unknown subcommand"),
}
}

View file

@ -59,6 +59,7 @@ pub fn run<'a>(args: &ArgMatches<'a>, conn: &Connection) {
("init", Some(x)) => init(x, conn),
("refill", Some(x)) => refill(x, conn, None),
("unlock", Some(x)) => unlock(x),
("", None) => command().print_help().unwrap(),
_ => println!("Unknown subcommand"),
}
}

View file

@ -80,6 +80,7 @@ pub fn run<'a>(args: &ArgMatches<'a>, conn: &Connection) {
match args.subcommand() {
("new", Some(x)) => new(x, conn),
("reset-password", Some(x)) => reset_password(x, conn),
("", None) => command().print_help().unwrap(),
_ => println!("Unknown subcommand"),
}
}