1
0
Fork 0
mirror of synced 2025-09-23 12:18:44 +00:00

show help when running "zokrates mpc"

This commit is contained in:
dark64 2023-02-06 20:05:30 +01:00
parent 3f2ca5f5ad
commit c77e7ae5c3
2 changed files with 4 additions and 2 deletions

View file

@ -0,0 +1 @@
Show help when running `zokrates mpc`

View file

@ -1,4 +1,4 @@
use clap::{App, ArgMatches, SubCommand};
use clap::{App, ArgMatches, SubCommand, AppSettings};
pub mod beacon;
pub mod contribute;
@ -9,6 +9,7 @@ pub mod verify;
pub fn subcommand() -> App<'static, 'static> {
SubCommand::with_name("mpc")
.about("Multi-party computation (MPC) protocol")
.setting(AppSettings::SubcommandRequiredElseHelp)
.subcommands(vec![
init::subcommand().display_order(1),
contribute::subcommand().display_order(2),
@ -25,6 +26,6 @@ pub fn exec(sub_matches: &ArgMatches) -> Result<(), String> {
("beacon", Some(sub_matches)) => beacon::exec(sub_matches),
("verify", Some(sub_matches)) => verify::exec(sub_matches),
("export", Some(sub_matches)) => export::exec(sub_matches),
_ => unreachable!(),
_ => unreachable!()
}
}