Skip to content

Commit

Permalink
Fix more missing Utils::Curl references.
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeMcQuaid committed Sep 5, 2023
1 parent e02ec5e commit 556e7ac
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Library/Homebrew/cask/audit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ def audit_cask_path
# options: T.untyped).void
# }
def validate_url_for_https_availability(url_to_check, url_type, cask_token, tap, location: nil, **options)
problem = curl_check_http_content(url_to_check.to_s, url_type, **options)
problem = ::Utils::Curl.curl_check_http_content(url_to_check.to_s, url_type, **options)
exception = tap&.audit_exception(:secure_connection_audit_skiplist, cask_token, url_to_check.to_s)

if problem
Expand Down
16 changes: 16 additions & 0 deletions Library/Homebrew/formula_auditor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,7 @@ def audit_homepage
spec.using == :homebrew_curl
end

<<<<<<< Updated upstream
if (http_content_problem = curl_check_http_content(
homepage,
SharedAudits::URL_TYPE_HOMEPAGE,
Expand All @@ -546,6 +547,21 @@ def audit_homepage
strict: @strict,
use_homebrew_curl: use_homebrew_curl,
))
||||||| Stash base
if (http_content_problem = curl_check_http_content(homepage,
SharedAudits::URL_TYPE_HOMEPAGE,
user_agents: [:browser, :default],
check_content: true,
strict: @strict,
use_homebrew_curl: use_homebrew_curl))
=======
if (http_content_problem = Utils::Curl.curl_check_http_content(homepage,
SharedAudits::URL_TYPE_HOMEPAGE,
user_agents: [:browser, :default],
check_content: true,
strict: @strict,
use_homebrew_curl: use_homebrew_curl))
>>>>>>> Stashed changes
problem http_content_problem
end
end
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/github_packages.rb
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ def schema_uri(basename, uris)
# Going forward, this should probably be pinned to tags.
# We currently use features newer than the last one (v1.0.2).
url = "https://raw.githubusercontent.com/opencontainers/image-spec/170393e57ed656f7f81c3070bfa8c3346eaa0a5a/schema/#{basename}.json"
out, = curl_output(url)
out, = Utils::Curl.curl_output(url)
json = JSON.parse(out)

@schema_json ||= {}
Expand Down
12 changes: 12 additions & 0 deletions Library/Homebrew/resource_auditor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -123,12 +123,24 @@ def audit_urls
raise HomebrewCurlDownloadStrategyError, url if
strategy <= HomebrewCurlDownloadStrategy && !Formula["curl"].any_version_installed?

<<<<<<< Updated upstream
if (http_content_problem = Utils::Curl.curl_check_http_content(
url,
"source URL",
specs: specs,
use_homebrew_curl: @use_homebrew_curl,
))
||||||| Stash base
if (http_content_problem = curl_check_http_content(url,
"source URL",
specs: specs,
use_homebrew_curl: @use_homebrew_curl))
=======
if (http_content_problem = Utils::Curl.curl_check_http_content(url,
"source URL",
specs: specs,
use_homebrew_curl: @use_homebrew_curl))
>>>>>>> Stashed changes
problem http_content_problem
end
elsif strategy <= GitDownloadStrategy
Expand Down

0 comments on commit 556e7ac

Please sign in to comment.