mirror of
https://github.com/actions/go-versions.git
synced 2026-02-08 15:23:35 +08:00
Logs Path change
This commit is contained in:
@@ -10,9 +10,14 @@ Describe "Go" {
|
|||||||
function Get-UseGoLogs {
|
function Get-UseGoLogs {
|
||||||
# GitHub Windows images don't have `HOME` variable
|
# GitHub Windows images don't have `HOME` variable
|
||||||
$homeDir = $env:HOME ?? $env:HOMEDRIVE
|
$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
|
$logContent = Get-Content $_.Fullname -Raw
|
||||||
return $logContent -match "setup-go@v"
|
return $logContent -match "setup-go@v"
|
||||||
} | Select-Object -First 1
|
} | Select-Object -First 1
|
||||||
|
|||||||
Reference in New Issue
Block a user