From 5addbbf86314d0190647a16404d267b4c6ee0232 Mon Sep 17 00:00:00 2001 From: Frederick Giasson Date: Wed, 11 Feb 2015 14:02:59 -0500 Subject: [PATCH] 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. --- bin/lein.bat | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/lein.bat b/bin/lein.bat index 6cf7db54..ed2a736d 100755 --- a/bin/lein.bat +++ b/bin/lein.bat @@ -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