Fix #42 - curl should follow redirects, powershell wget backport

This commit is contained in:
Ganesh Viswanathan 2019-07-16 22:17:32 -05:00
commit 2be81614a9

View file

@ -43,9 +43,10 @@ proc downloadUrl*(url: string) =
file = url.extractFilename()
ext = file.splitFile().ext.toLowerAscii()
var cmd = "curl $# -o $#"
if defined(Windows):
cmd = "powershell wget $# -OutFile $#"
var cmd = if defined(Windows):
"powershell [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; wget $# -OutFile $#"
else:
"curl -L $# -o $#"
if not (ext == ".zip" and fileExists(gOutput/file)):
echo "Downloading " & file