Land #444, Fix Powershell SSL/TLS error for chocolatey download

This commit is contained in:
Jeffrey Martin 2020-02-08 08:45:18 -06:00
commit 6ef3902e25
No known key found for this signature in database
GPG Key ID: 0CD9BBC2AF15F171
2 changed files with 2 additions and 1 deletions

View File

@ -185,7 +185,7 @@
{
"type": "powershell",
"inline": [
"$env:chocolateyVersion = '0.10.8'; iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))"
"$env:chocolateyVersion = '0.10.8'; [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))"
],
"pause_before": "60s"
},

View File

@ -1,5 +1,6 @@
$ChocoInstallPath = "$env:SystemDrive\ProgramData\Chocolatey\bin"
if (!(Test-Path $ChocoInstallPath)) {
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
}