mirror of
https://github.com/actions/go-versions.git
synced 2025-07-18 13:18:24 +02:00
Logs Path change
This commit is contained in:
parent
a377a0baa6
commit
bac9381d43
1 changed files with 7 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue