Skip to content
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

cmd/vendor-install: handle broken shasum. #17425

Merged
merged 1 commit into from
Jun 4, 2024
Merged

Conversation

MikeMcQuaid
Copy link
Member

If shasum is broken and doesn't produce a valid checksum: we were just doing the checksum comparison with an empty checksum.

Instead, let's treat an empty checksum as a failure condition, rather than just the executable bit being present for the relevant binary, and iterate through the available tools to try and get a non-empty checksum.

If they all produce an empty checksum: provide a different error to make it a bit more obvious what's happening here.

Copy link
Member

@SMillerDev SMillerDev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me

If `shasum` is broken and doesn't produce a valid checksum: we were
just doing the checksum comparison with an empty checksum.

Instead, let's treat an empty checksum as a failure condition, rather
than just the executable bit being present for the relevant binary, and
iterate through the available tools to try and get a non-empty checksum.

If they all produce an empty checksum: provide a different error to make
it a bit more obvious what's happening here.
@MikeMcQuaid MikeMcQuaid merged commit 2051e05 into master Jun 4, 2024
25 checks passed
@MikeMcQuaid MikeMcQuaid deleted the handle_broken_shasum branch June 4, 2024 13:00
@github-actions github-actions bot added the outdated PR was locked due to age label Jul 5, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants