-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Verify the source on download #373
base: master
Are you sure you want to change the base?
Conversation
a875bcf
to
51b6353
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand this based on the diff. The commit message should also (at least briefly) explain this.
I assume this is about the checksum/hash verification of the source download? If so we should definitely automatically verify it but errors should be propagated and IMO we should even delete the file if the checksum didn't match (can be a bit inconvenient sometimes but makes sense for security reasons).
src/commands/source/download.rs
Outdated
let verify_result = super::verify(matches, config, repo, progressbars).await; | ||
debug!("verify_result = {:?}", verify_result); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this do anything? Looks like it only adds debug output (assuming verify
hopefully doesn't panic).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested and behaves as expected but the exit code ist still 0 even when the verfication fails
Fixes science-computing#371 Signed-off-by: Nico Steinle <nico.steinle@eviden.com>
51b6353
to
e78060b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now we got an exit code of 1 if the verification fails.
Tested and works as expected :)
Thanks!
Fixes #371