mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 10:21:07 +08:00
Don't download nupkg. nuget.exe auto-downloads it
This commit is contained in:
parent
5b7dc56268
commit
7207316ed4
@ -14,29 +14,6 @@ $nugetexe = & $scriptsDir\fetchDependency.ps1 "nuget"
|
||||
$nugetPackageDir = "$downloadsDir\nuget-packages"
|
||||
|
||||
$SetupAPIVersion = "1.3.269-rc"
|
||||
$url = "https://api.nuget.org/packages/microsoft.visualstudio.setup.configuration.native.$SetupAPIVersion.nupkg"
|
||||
$downloadName = "microsoft.visualstudio.setup.configuration.native.$SetupAPIVersion.nupkg"
|
||||
$downloadPath = "$downloadsDir\$downloadName"
|
||||
|
||||
if (!(Test-Path $downloadPath))
|
||||
{
|
||||
try {
|
||||
Start-BitsTransfer -Source $url -Destination $downloadPath -ErrorAction Stop
|
||||
}
|
||||
catch [System.Exception] {
|
||||
# If BITS fails for any reason, delete any potentially partially downloaded files and continue
|
||||
if (Test-Path $downloadPath)
|
||||
{
|
||||
Remove-Item $downloadPath
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!(Test-Path $downloadPath))
|
||||
{
|
||||
Write-Host("Downloading $downloadName...")
|
||||
(New-Object System.Net.WebClient).DownloadFile($url, $downloadPath)
|
||||
}
|
||||
|
||||
$nugetOutput = & $nugetexe install Microsoft.VisualStudio.Setup.Configuration.Native -Pre -Source $downloadsDir -OutputDirectory $nugetPackageDir 2>&1
|
||||
|
||||
$SetupConsoleExe = "$nugetPackageDir\Microsoft.VisualStudio.Setup.Configuration.Native.$SetupAPIVersion\tools\x86\Microsoft.VisualStudio.Setup.Configuration.Console.exe"
|
||||
|
Loading…
x
Reference in New Issue
Block a user