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

download_strategy: fix mirrors not working #16079

Merged
merged 1 commit into from Oct 4, 2023

Conversation

Bo98
Copy link
Member

@Bo98 Bo98 commented Oct 4, 2023

Fixes #15169.
Partially covers #15816.
Should cover #16078.

EricFromCanada added a commit to EricFromCanada/brew that referenced this pull request Oct 4, 2023
Copy link
Member

@MikeMcQuaid MikeMcQuaid 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, thanks @Bo98.

begin
parsed_output = curl_headers(url.to_s, wanted_headers: ["content-disposition"], timeout: timeout)
rescue ErrorDuringExecution
return [url, parse_basename(url), nil, nil, false]
Copy link
Member

Choose a reason for hiding this comment

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

Required by your change but just a drive-by thought that this is a horrendous return signature that's dying to be a e.g. Hash or Struct.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, agreed. Takes me a moment to understand everytime I look at it.

It's also difficult to change without breaking custom download strategies, so probably worth doing with a larger refactor with better public API.

@MikeMcQuaid MikeMcQuaid merged commit 13b01a6 into Homebrew:master Oct 4, 2023
27 checks passed
@Bo98 Bo98 deleted the mirror-fix branch October 4, 2023 16:13
@github-actions github-actions bot added the outdated PR was locked due to age label Nov 4, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 4, 2023
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.

custom download strategy no longer works after commit fbf474a3fd107b636eb397b0aa247f7e03f2dc72
2 participants