simplify download, get rid of VS edition variable

This commit is contained in:
Mikhail Timofeev
2020-03-11 15:29:35 +03:00
parent 82330ae29b
commit bb52802370

View File

@@ -170,11 +170,10 @@ function Install-VsixExtension
) )
$FilePath = "${env:Temp}\$Name" $FilePath = "${env:Temp}\$Name"
$ReleaseInPath = 'Enterprise'
$exitCode = -1 $exitCode = -1
$retries = 20 $retries = 20
while($true) while($retries -gt 0)
{ {
try try
{ {
@@ -186,17 +185,18 @@ function Install-VsixExtension
{ {
Write-Host "There is an error during $Name downloading" Write-Host "There is an error during $Name downloading"
$_ $_
if ($retries -gt 0)
{
$retries-- $retries--
Write-Host "Waiting 30 seconds before retrying. Retries left: $retries"
Start-Sleep -Seconds 30 if ($retries -eq 0)
} {
else {
Write-Host "File can't be downloaded" Write-Host "File can't be downloaded"
$_ $_
exit 1 exit 1
} }
Write-Host "Waiting 30 seconds before retrying. Retries left: $retries"
Start-Sleep -Seconds 30
} }
} }
@@ -205,7 +205,7 @@ function Install-VsixExtension
Write-Host "Starting Install $Name..." Write-Host "Starting Install $Name..."
try try
{ {
$process = Start-Process -FilePath "C:\Program Files (x86)\Microsoft Visual Studio\2019\$ReleaseInPath\Common7\IDE\VSIXInstaller.exe" -ArgumentList $ArgumentList -Wait -PassThru $process = Start-Process -FilePath "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\VSIXInstaller.exe" -ArgumentList $ArgumentList -Wait -PassThru
} }
catch catch
{ {