mirror of
https://github.com/actions/runner-images.git
synced 2025-12-20 06:35:47 +00:00
Toolcache: fix typos in windows toolcache provisioners
This commit is contained in:
@@ -29,8 +29,7 @@ $ToolsDirectory = $Dest + $Path
|
||||
$env:AGENT_TOOLSDIRECTORY = $ToolsDirectory
|
||||
setx AGENT_TOOLSDIRECTORY $ToolsDirectory /M
|
||||
|
||||
# Install tools form NPM
|
||||
|
||||
# Install HostedToolCache tools via NPM
|
||||
$ToolVersionsFileContent = Get-Content -Path "$env:ROOT_FOLDER/toolcache.json" -Raw
|
||||
$ToolVersions = ConvertFrom-Json -InputObject $ToolVersionsFileContent
|
||||
|
||||
|
||||
@@ -37,14 +37,14 @@ function ToolcacheTest {
|
||||
if (Test-Path "$env:AGENT_TOOLSDIRECTORY\$SoftwareName")
|
||||
{
|
||||
$description = ""
|
||||
[array]$instaledVersions = GetChildFolders -Path "$env:AGENT_TOOLSDIRECTORY\$SoftwareName"
|
||||
if ($instaledVersions.count -gt 0){
|
||||
[array]$installedVersions = GetChildFolders -Path "$env:AGENT_TOOLSDIRECTORY\$SoftwareName"
|
||||
if ($installedVersions.count -gt 0){
|
||||
$softwarePackages = $packages | Where-Object { $_.ToolName -eq $SoftwareName }
|
||||
foreach($softwarePackage in $softwarePackages)
|
||||
{
|
||||
foreach ($version in $softwarePackage.Versions)
|
||||
{
|
||||
$foundVersion = $instaledVersions | where { $_.StartsWith($version) }
|
||||
$foundVersion = $installedVersions | where { $_.StartsWith($version) }
|
||||
|
||||
if ($foundVersion -ne $null){
|
||||
|
||||
|
||||
Reference in New Issue
Block a user