Adding the header option to CurlDownloadStrategy.
It's easy to access github private resources later through specific `header` settings. e.g. ``` cask 'XXXX' do ... url "https://raw.githubusercontent.com/....", header : "Authorization: token #{ENV['HOMEBREW_GITHUB_API_TOKEN']}" ... end ```
This commit is contained in:
parent
e407da3d06
commit
e1a592c76c
@ -421,6 +421,8 @@ class CurlDownloadStrategy < AbstractFileDownloadStrategy
|
||||
|
||||
args += ["--user", meta.fetch(:user)] if meta.key?(:user)
|
||||
|
||||
args += ["-H", meta.fetch(:header)] if meta.key?(:header)
|
||||
|
||||
args
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user