Skip to content

Commit

Permalink
change error message and add note for error handling
Browse files Browse the repository at this point in the history
Signed-off-by: simonsan <[email protected]>
  • Loading branch information
simonsan committed Nov 17, 2024
1 parent 1701893 commit 8f78c33
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion crates/core/src/commands/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,13 +309,21 @@ pub(crate) fn check_repository<P: ProgressBars, S: Open>(
let data = match be.read_full(FileType::Pack, &id) {
Ok(data) => data,
Err(err) => {
// FIXME: This needs different handling, now it prints a full display of RusticError
// Instead we should actually collect and return a list of errors on the happy path
// for `Check`, as this is a non-critical operation and we want to show all errors
// to the user.
error!("Error reading data for pack {id} : {err}");
return;
}
};
match check_pack(be, pack, data, &p) {
Ok(()) => {}
Err(err) => error!("Error reading pack {id} : {err}",),
// FIXME: This needs different handling, now it prints a full display of RusticError
// Instead we should actually collect and return a list of errors on the happy path
// for `Check`, as this is a non-critical operation and we want to show all errors
// to the user.
Err(err) => error!("Pack {id} is not valid: {err}",),
}
});
p.finish();
Expand Down

0 comments on commit 8f78c33

Please sign in to comment.