Enable TLS1.2 in the generatenupkg step (#7833)

This commit is contained in:
Matt Mitchell 2020-06-19 08:49:35 -07:00 committed by GitHub
parent b4da79a6ec
commit 85de1d64f7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,6 +11,8 @@ param(
[Parameter(Mandatory=$false)][string]$MmVersion
)
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bOR [Net.SecurityProtocolType]::Tls12
$NuGetDir = Join-Path $BinDir "nuget"
$NuGetExe = Join-Path $NuGetDir "nuget.exe"
$OutputDirectory = [System.IO.Path]::GetDirectoryName($NupkgFile)
@ -29,6 +31,11 @@ if (-not (Test-Path $NuGetExe)) {
wget https://dist.nuget.org/win-x86-commandline/v3.5.0/nuget.exe -OutFile $NuGetExe
}
if (-not (Test-Path $NuGetExe)) {
Write-Error "Could not download nuget.exe"
Exit 1
}
if (Test-Path $NupkgFile) {
Remove-Item -Force $NupkgFile
}