2025-05-21 15:29:33 +02:00

18 lines
639 B
PowerShell

$buildLogPath = Join-Path $PSScriptRoot "arm_build.log"
$errorLogPath = Join-Path $PSScriptRoot "arm_error.log"
if (Test-Path $buildLogPath) {
$content = Get-Content $buildLogPath
$matches = $content | Select-String -Pattern "\berror\b" -CaseSensitive:$true
if ($matches) {
$matches | ForEach-Object { $_.Line } | Set-Content $errorLogPath
Write-Host "Error lines have been extracted to $errorLogPath"
Write-Host "Found $($matches.Count) matches"
} else {
Write-Host "No errors found in the build log"
}
} else {
Write-Host "Error: Build log file not found at $buildLogPath"
}