Closed Shnatsel closed 2 years ago
Right now we have the err_exit function that just prints the error and exits:
err_exit
https://github.com/rust-secure-code/cargo-supply-chain/blob/11516a20032be39a41ad08894357752f263b7253/src/main.rs#L235-L243
This makes code difficult to test, because it just exits the testing process on error. We should return errors instead.
The anyhow crate makes that rather easy, and is low on supply chain sprawl (unlike something like color-eyre).
anyhow
color-eyre
Right now we have the
err_exit
function that just prints the error and exits:https://github.com/rust-secure-code/cargo-supply-chain/blob/11516a20032be39a41ad08894357752f263b7253/src/main.rs#L235-L243
This makes code difficult to test, because it just exits the testing process on error. We should return errors instead.
The
anyhow
crate makes that rather easy, and is low on supply chain sprawl (unlike something likecolor-eyre
).