feat: friendly error message

This commit is contained in:
2021-07-11 01:23:17 +08:00
parent fc38150426
commit bc5167d287

View File

@@ -13,7 +13,14 @@ use clap::{App, AppSettings};
use cmd::{Command, CommandError};
use cmd::DefaultCommandImpl;
fn main() -> CommandError {
fn main() {
if let Err(e) = inner_main() {
failure_and_exit!("Run cli error: {}", e);
}
}
fn inner_main() -> CommandError {
let commands: Vec<Box<dyn Command>> = vec![
Box::new(register::CommandImpl),
Box::new(sign::CommandImpl),