mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-20 06:29:50 +00:00
simplify download, get rid of VS edition variable
This commit is contained in:
@@ -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--
|
||||||
|
|
||||||
|
if ($retries -eq 0)
|
||||||
{
|
{
|
||||||
$retries--
|
|
||||||
Write-Host "Waiting 30 seconds before retrying. Retries left: $retries"
|
|
||||||
Start-Sleep -Seconds 30
|
|
||||||
}
|
|
||||||
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
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user