fix(CI): follow redirects when downloading MinIO client#319
Merged
Conversation
dl.min.io now responds with an HTTP 302 redirect to GitHub Releases for the mc binary. curl -O does not follow redirects, so the install script was saving the empty redirect response (141 bytes) as the mc binary and chmod +x-ing it. Subsequent steps that invoke mc fail with `/usr/local/bin/mc: line 1: a: No such file or directory`. Add -L so curl follows the redirect, and -f so it fails the script loudly if the download returns a non-2xx status instead of silently producing an invalid binary. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
bcmeireles
approved these changes
May 12, 2026
bcmeireles
approved these changes
May 12, 2026
ennuite
approved these changes
May 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
dl.min.ionow responds withHTTP/2 302redirecting to GitHub Releases for themcbinary, but.github/scripts/install_minio_client.shusedcurl -O(which does not follow redirects). The result is that the empty 302 response body (141 bytes) is being saved as themcbinary,chmod +x-ed, and then later steps that invokemcfail with:This breaks every CI job that depends on MinIO (caching, hooks, functional/adapter/*, etc.).
Fix
Replace
curl -Owithcurl -fLO:-L— follow the 302 redirect to GitHub Releases so the real ~30 MB binary is downloaded.-f— fail the script on any non-2xx HTTP status, so we get a loud failure instead of silently producing an invalid binary if the download URL changes again in the future.Verification
Test Plan
🤖 Generated with Claude Code