We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 882ce73 commit 772bfc1Copy full SHA for 772bfc1
1 file changed
src/main.rs
@@ -3,8 +3,10 @@
3
use {
4
crate::{
5
disk::LiveDiskIo,
6
+ errors::SyncpackError,
7
registry::client::{LiveRegistryClient, RegistryClient},
8
},
9
+ clap::error::ErrorKind,
10
log::error,
11
std::{process::exit, sync::Arc},
12
};
@@ -51,6 +53,12 @@ async fn main() {
51
53
.await;
52
54
55
if let Err(e) = result {
56
+ if let SyncpackError::CliError(clap_err) = &e {
57
+ if matches!(clap_err.kind(), ErrorKind::DisplayHelp | ErrorKind::DisplayVersion) {
58
+ println!("{clap_err}");
59
+ return;
60
+ }
61
62
let msg = e.to_string();
63
if !msg.is_empty() {
64
error!("{e}");
0 commit comments