From 4e03afeeb6190c506ccfbd583fb4af0c56437c85 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Tue, 13 Dec 2022 10:44:18 +0000 Subject: [PATCH] utils/github/api: curl format token, not a ruby one. --- Library/Homebrew/utils/github/api.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/utils/github/api.rb b/Library/Homebrew/utils/github/api.rb index 86d1cdc2c7..8274c0c8cf 100644 --- a/Library/Homebrew/utils/github/api.rb +++ b/Library/Homebrew/utils/github/api.rb @@ -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