utils/github/api: curl format token, not a ruby one.

This commit is contained in:
Mike McQuaid 2022-12-13 10:44:18 +00:00
parent 08644386e1
commit 4e03afeeb6
No known key found for this signature in database
GPG Key ID: 3338A31AFDB1D829

View File

@ -185,7 +185,10 @@ module GitHub
# This is a no-op if the user is opting out of using the GitHub API.
return block_given? ? yield({}) : {} if Homebrew::EnvConfig.no_github_api?
args = ["--header", "Accept: application/vnd.github+json", "--write-out", "\n%\{http_code}"]
# This is a Curl format token, not a Ruby one.
# rubocop:disable Style/FormatStringToken
args = ["--header", "Accept: application/vnd.github+json", "--write-out", "\n%{http_code}"]
# rubocop:enable Style/FormatStringToken
token = credentials
args += ["--header", "Authorization: token #{token}"] unless credentials_type == :none