Skip to content

Commit 8f78c33

Browse files
committed
change error message and add note for error handling
Signed-off-by: simonsan <[email protected]>
1 parent 1701893 commit 8f78c33

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

crates/core/src/commands/check.rs

+9-1
Original file line numberDiff line numberDiff line change
@@ -309,13 +309,21 @@ pub(crate) fn check_repository<P: ProgressBars, S: Open>(
309309
let data = match be.read_full(FileType::Pack, &id) {
310310
Ok(data) => data,
311311
Err(err) => {
312+
// FIXME: This needs different handling, now it prints a full display of RusticError
313+
// Instead we should actually collect and return a list of errors on the happy path
314+
// for `Check`, as this is a non-critical operation and we want to show all errors
315+
// to the user.
312316
error!("Error reading data for pack {id} : {err}");
313317
return;
314318
}
315319
};
316320
match check_pack(be, pack, data, &p) {
317321
Ok(()) => {}
318-
Err(err) => error!("Error reading pack {id} : {err}",),
322+
// FIXME: This needs different handling, now it prints a full display of RusticError
323+
// Instead we should actually collect and return a list of errors on the happy path
324+
// for `Check`, as this is a non-critical operation and we want to show all errors
325+
// to the user.
326+
Err(err) => error!("Pack {id} is not valid: {err}",),
319327
}
320328
});
321329
p.finish();

0 commit comments

Comments
 (0)