Merge pull request #22248 from edsantiago/windows-perl-is-in-vms

Windows: clean up temporary perl install
This commit is contained in:
openshift-merge-bot[bot]
2024-04-04 09:14:48 +00:00
committed by GitHub

View File

@ -40,22 +40,11 @@ if ($Env:CI -eq "true") {
Remove-Item Env:\CIRRUS_PR_BODY -ErrorAction:Ignore
}
function Install-Perl-If-Required {
if (-not (Get-Command perl -ErrorAction SilentlyContinue)) {
Write-Host "`nInstalling Perl as it is required to use logformatter"
choco install --no-progress --confirm --acceptlicense --nocolor StrawberryPerl
Write-Host "`nAdd perl to the PATH"
Set-Item "Env:PATH" "$Env:PATH;C:\Strawberry\perl\bin"
}
}
function Invoke-Logformatter {
param (
[Collections.ArrayList] $unformattedLog
)
Install-Perl-If-Required
Write-Host "Invoking Logformatter"
$logFormatterInput = @('/define.gitCommit=' + $(git rev-parse HEAD)) + $unformattedLog
$logformatterPath = "$PSScriptRoot\logformatter"