utils/github: fully scope curl usage.

Fixes #15965
This commit is contained in:
Mike McQuaid 2023-09-05 17:07:59 -04:00
parent 9677a9a8ef
commit 8c1c0c5a22
No known key found for this signature in database
GPG Key ID: 3338A31AFDB1D829

View File

@ -728,7 +728,7 @@ module GitHub
def self.last_commit(user, repo, ref, version)
return if Homebrew::EnvConfig.no_github_api?
output, _, status = curl_output(
output, _, status = Utils::Curl.curl_output(
"--silent", "--head", "--location",
"--header", "Accept: application/vnd.github.sha",
url_to("repos", user, repo, "commits", ref).to_s
@ -746,7 +746,7 @@ module GitHub
def self.multiple_short_commits_exist?(user, repo, commit)
return if Homebrew::EnvConfig.no_github_api?
output, _, status = curl_output(
output, _, status = Utils::Curl.curl_output(
"--silent", "--head", "--location",
"--header", "Accept: application/vnd.github.sha",
url_to("repos", user, repo, "commits", commit).to_s