mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Add more general support for passing credentials to curl
This commit is contained in:
parent
18b8681a7c
commit
00ad37dd84
@ -258,6 +258,7 @@ class CurlDownloadStrategy < AbstractDownloadStrategy
|
|||||||
|
|
||||||
def curl(*args)
|
def curl(*args)
|
||||||
args << '--connect-timeout' << '5' unless mirrors.empty?
|
args << '--connect-timeout' << '5' unless mirrors.empty?
|
||||||
|
args << "--user" << meta.fetch(:user) if meta.key?(:user)
|
||||||
super
|
super
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -415,13 +416,6 @@ class S3DownloadStrategy < CurlDownloadStrategy
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
class AttResearchDownloadStrategy < CurlDownloadStrategy
|
|
||||||
def curl(*args)
|
|
||||||
args << "--user" << "I accept www.opensource.org/licenses/eclipse:."
|
|
||||||
super
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
class SubversionDownloadStrategy < VCSDownloadStrategy
|
class SubversionDownloadStrategy < VCSDownloadStrategy
|
||||||
def initialize(name, resource)
|
def initialize(name, resource)
|
||||||
super
|
super
|
||||||
|
Loading…
x
Reference in New Issue
Block a user