aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nimgen/external.nim7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/nimgen/external.nim b/src/nimgen/external.nim
index 8656147..cc7a5e8 100644
--- a/src/nimgen/external.nim
+++ b/src/nimgen/external.nim
@@ -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