-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Conversation
Review period skipped due to |
@@ -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| |
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 really understand what the code below is doing or why it's needed. A comment might be worth adding?
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.
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
.
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.
Ah, gotcha. Maybe worth adding a comment explaining this?
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?Homebrew/homebrew-core#86415 (comment)