rust-secure-code / cargo-supply-chain

Gather author, contributor and publisher data on crates in your dependency graph.
Apache License 2.0
316 stars 19 forks source link

Return anyhow error instead of calling err_exit #80

Closed ugandalf closed 2 years ago

ugandalf commented 2 years ago

Resolves #74. Not sure how to manually go about checking if it works - it could probably use tests now that we return errors.

ugandalf commented 2 years ago

I couldn't get Context to work, so I left those two occurrences as => bail!("...\n {}", err). From my understanding I'd need to make a struct wrapping error types that I get, and then implement some sort of detach() -> Result<(), anyhow::Error> method, but I don't know how to go about that or if that's what needs to be done.

Shnatsel commented 2 years ago

Thanks!