Change sq import to print what is imported
- Change `sq import` to print what is imported.
This commit is contained in:
parent
2ffa96dbca
commit
cd1a26de1c
@ -48,10 +48,18 @@ pub fn dispatch<'store>(mut config: Config<'store>, cmd: import::Command)
|
||||
};
|
||||
|
||||
let fingerprint = cert.fingerprint();
|
||||
let userid = cert.userids().next()
|
||||
.map(|userid| {
|
||||
String::from_utf8_lossy(userid.value()).to_string()
|
||||
})
|
||||
.unwrap_or_else(|| "<unknown>".to_string());
|
||||
if let Err(err) = cert_store.update_by(Cow::Owned(cert), &mut stats) {
|
||||
eprintln!("Error importing {}: {}", fingerprint, err);
|
||||
eprintln!("Error importing {}, {:?}: {}",
|
||||
fingerprint, userid, err);
|
||||
stats.errors += 1;
|
||||
continue;
|
||||
} else {
|
||||
eprintln!("Imported {}, {:?}", fingerprint, userid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user