feat: friendly error message
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user