show help when running "zokrates mpc"
This commit is contained in:
parent
3f2ca5f5ad
commit
c77e7ae5c3
2 changed files with 4 additions and 2 deletions
1
changelogs/unreleased/1275-dark64
Normal file
1
changelogs/unreleased/1275-dark64
Normal file
|
@ -0,0 +1 @@
|
|||
Show help when running `zokrates mpc`
|
|
@ -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!()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue