Remove all macOS-10.15 related code (#7078)

This commit is contained in:
sergei-pyshnoi
2023-02-13 16:40:48 +01:00
committed by GitHub
parent 539b772d6b
commit 8767a6eb4e
21 changed files with 29 additions and 752 deletions

View File

@@ -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()