mirror of
https://github.com/actions/runner-images.git
synced 2025-12-18 15:57:17 +00:00
nitpicks
This commit is contained in:
@@ -167,8 +167,7 @@ function Get-VS19ExtensionVersion
|
|||||||
[string] [Parameter(Mandatory=$true)] $packageName
|
[string] [Parameter(Mandatory=$true)] $packageName
|
||||||
)
|
)
|
||||||
|
|
||||||
$vsProgramData = Get-Item -Path "C:\ProgramData\Microsoft\VisualStudio\Packages\_Instances"
|
$instanceFolders = Get-ChildItem -Path "C:\ProgramData\Microsoft\VisualStudio\Packages\_Instances"
|
||||||
$instanceFolders = Get-ChildItem -Path $vsProgramData.FullName
|
|
||||||
|
|
||||||
if ($instanceFolders -is [array])
|
if ($instanceFolders -is [array])
|
||||||
{
|
{
|
||||||
@@ -176,7 +175,7 @@ function Get-VS19ExtensionVersion
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
$stateContent = Get-Content -Path ($instanceFolders.FullName + '\state.packages.json')
|
$stateContent = Get-Content -Path (Join-Path $instanceFolders '\state.packages.json')
|
||||||
$state = $stateContent | ConvertFrom-Json
|
$state = $stateContent | ConvertFrom-Json
|
||||||
$packageVersion = ($state.packages | Where-Object { $_.id -eq $packageName }).version
|
$packageVersion = ($state.packages | Where-Object { $_.id -eq $packageName }).version
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user