diff --git a/tests/Go.Tests.ps1 b/tests/Go.Tests.ps1 index cf8196b..f3ee5c4 100644 --- a/tests/Go.Tests.ps1 +++ b/tests/Go.Tests.ps1 @@ -10,9 +10,14 @@ Describe "Go" { function Get-UseGoLogs { # GitHub Windows images don't have `HOME` variable $homeDir = $env:HOME ?? $env:HOMEDRIVE - $logsFolderPath = Join-Path -Path $homeDir -ChildPath "runners/*/_diag/pages" -Resolve + $possiblePaths = @( + Join-Path -Path $homeDir -ChildPath "actions-runner/cached/_diag/pages" + Join-Path -Path $homeDir -ChildPath "runners/*/_diag/pages" + ) + + $logsFolderPath = $possiblePaths | Where-Object { Test-Path $_ } | Select-Object -First 1 - $useGoLogFile = Get-ChildItem -Path $logsFolderPath | Where-Object { + $useGoLogFile = Get-ChildItem -Path $logsFolderPath -File | Where-Object { $logContent = Get-Content $_.Fullname -Raw return $logContent -match "setup-go@v" } | Select-Object -First 1