Reorder the possible HTTP proxies to use to download Leiningen from GitHub. The new sequence is: PowerShell, Curl and then Wget.

Fixes issue #1800 as experienced by multiple users.
This commit is contained in:
Frederick Giasson 2015-02-11 14:02:59 -05:00
parent 772d38342f
commit 5addbbf863

View file

@ -141,6 +141,11 @@ if NOT "x%HTTP_CLIENT%" == "x" (
%HTTP_CLIENT% %1 %2
goto EOF
)
call powershell -? >nul 2>&1
if NOT ERRORLEVEL 1 (
powershell -Command "& {param($a,$f) $client = New-Object System.Net.WebClient; $client.Proxy.Credentials =[System.Net.CredentialCache]::DefaultNetworkCredentials; $client.DownloadFile($a, $f)}" ""%2"" ""%1""
goto EOF
)
call wget --help >nul 2>&1
if NOT ERRORLEVEL 1 (
call wget -O %1 %2
@ -154,11 +159,6 @@ if NOT ERRORLEVEL 1 (
call curl %CURL_PROXY% -f -L -o %1 %2
goto EOF
)
call powershell -? >nul 2>&1
if NOT ERRORLEVEL 1 (
powershell -Command "& {param($a,$f) $client = New-Object System.Net.WebClient; $client.Proxy.Credentials =[System.Net.CredentialCache]::DefaultNetworkCredentials; $client.DownloadFile($a, $f)}" ""%2"" ""%1""
goto EOF
)
goto NO_HTTP_CLIENT