mirror of
https://github.com/actions/go-versions.git
synced 2026-01-29 05:28:35 +00:00
Logs Path change
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user