Fix #42 - curl should follow redirects, powershell wget backport
This commit is contained in:
parent
39f5f320a6
commit
2be81614a9
1 changed files with 4 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue