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