mirror of
https://github.com/actions/runner-images.git
synced 2025-12-13 12:48:18 +00:00
[macOS] Add Xcode symlinks to the Software Report (#10736)
This commit is contained in:
@@ -94,12 +94,26 @@ function Build-XcodeTable {
|
||||
|
||||
$xcodeList = $xcodeInfo.Values | ForEach-Object { $_.VersionInfo } | Sort-Object $sortRules
|
||||
return $xcodeList | ForEach-Object {
|
||||
$defaultPostfix = If ($_.IsDefault) { " (default)" } else { "" }
|
||||
$betaPostfix = If ($_.IsStable) { "" } else { " (beta)" }
|
||||
$defaultPostfix = if ($_.IsDefault) { " (default)" } else { "" }
|
||||
$betaPostfix = if ($_.IsStable) { "" } else { " (beta)" }
|
||||
$targetPath = $_.Path
|
||||
$symlinks = @()
|
||||
Get-ChildItem -Path "/Applications" | ForEach-Object {
|
||||
if ($_.LinkType -eq 'SymbolicLink') {
|
||||
$linkTarget = & readlink $_.FullName
|
||||
if ($linkTarget -eq $targetPath) {
|
||||
$symlinks += $_.FullName
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($null -eq $symlinks) {
|
||||
$symlinks = @("N/A")
|
||||
}
|
||||
return [PSCustomObject] @{
|
||||
"Version" = $_.Version.ToString() + $betaPostfix + $defaultPostfix
|
||||
"Build" = $_.Build
|
||||
"Path" = $_.Path
|
||||
"Symlinks" = [String]::Join("<br>", $symlinks)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user