feat: v1.3.4 return error codes
This commit is contained in:
@@ -85,6 +85,7 @@ impl Command for CommandImpl {
|
||||
}
|
||||
} else {
|
||||
warning!("YubiKey not found");
|
||||
return Ok(Some(1));
|
||||
}
|
||||
|
||||
Ok(None)
|
||||
|
||||
@@ -58,6 +58,7 @@ impl Command for CommandImpl {
|
||||
}
|
||||
} else {
|
||||
warning!("YubiKey not found");
|
||||
return Ok(Some(1));
|
||||
}
|
||||
|
||||
Ok(None)
|
||||
|
||||
@@ -42,8 +42,10 @@ impl DefaultCommandImpl {
|
||||
}
|
||||
|
||||
fn main() {
|
||||
if let Err(e) = inner_main() {
|
||||
failure_and_exit!("Run cli error: {}", e);
|
||||
match inner_main() {
|
||||
Err(e) => failure_and_exit!("Run cli error: {}", e),
|
||||
Ok(Some(code)) => std::process::exit(code),
|
||||
Ok(None) => (),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user