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

utils/curl: fix flag handling #12177

Merged
merged 1 commit into from
Oct 4, 2021
Merged

utils/curl: fix flag handling #12177

merged 1 commit into from
Oct 4, 2021

Conversation

Bo98
Copy link
Member

@Bo98 Bo98 commented Oct 4, 2021

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

Homebrew/homebrew-core#86415 (comment)

@Bo98 Bo98 added the critical Critical change which should be shipped as soon as possible. label Oct 4, 2021
@BrewTestBot
Copy link
Member

Review period skipped due to critical label.

@Bo98 Bo98 merged commit 373b0da into Homebrew:master Oct 4, 2021
@Bo98 Bo98 deleted the curl-flag branch October 4, 2021 17:05
@@ -304,7 +304,13 @@ def curl_http_content_headers_and_checksum(
)
file = Tempfile.new.tap(&:close)

specs = specs.flat_map { |option, argument| ["--#{option.to_s.tr("_", "-")}", argument] }
specs = specs.flat_map do |option, argument|
Copy link
Member

Choose a reason for hiding this comment

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

I don't really understand what the code below is doing or why it's needed. A comment might be worth adding?

Copy link
Member Author

@Bo98 Bo98 Oct 5, 2021

Choose a reason for hiding this comment

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

It tries to convert specs to options, but made the strong assumption they are all key value. When I added a specs[:insecure] = true elsewhere it broke this, which seems to be invoked on brew audit --online.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, gotcha. Maybe worth adding a comment explaining this?

@github-actions github-actions bot added the outdated PR was locked due to age label Nov 5, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
critical Critical change which should be shipped as soon as possible. outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants