mirror of
https://github.com/actions/runner-images-sangeeth.git
synced 2025-12-20 06:29:50 +00:00
Remove all macOS-10.15 related code (#7078)
This commit is contained in:
@@ -158,11 +158,7 @@ function Build-OSInfoSection {
|
||||
$fieldsToInclude = @("System Version:", "Kernel Version:")
|
||||
$rawSystemInfo = Invoke-Expression "system_profiler SPSoftwareDataType"
|
||||
$parsedSystemInfo = $rawSystemInfo | Where-Object { -not ($_ | Select-String -NotMatch $fieldsToInclude) } | ForEach-Object { $_.Trim() }
|
||||
if ($os.IsCatalina) {
|
||||
$parsedSystemInfo[0] -match "System Version: macOS (?<version>\d+\.\d+)" | Out-Null
|
||||
} else {
|
||||
$parsedSystemInfo[0] -match "System Version: macOS (?<version>\d+)" | Out-Null
|
||||
}
|
||||
$parsedSystemInfo[0] -match "System Version: macOS (?<version>\d+)" | Out-Null
|
||||
$version = $Matches.Version
|
||||
$systemVersion = $parsedSystemInfo[0].Replace($fieldsToInclude[0],"").Trim()
|
||||
$kernelVersion = $parsedSystemInfo[1].Replace($fieldsToInclude[1],"").Trim()
|
||||
|
||||
Reference in New Issue
Block a user