use "license accept timeout" only on MacOS-13 (#8084)

This commit is contained in:
ilia-shipitsin
2023-08-15 15:23:02 +02:00
committed by GitHub
parent 9f81916bc7
commit 5487dbaad9

View File

@@ -126,10 +126,17 @@ function Approve-XcodeLicense {
[string]$Version
)
$os = Get-OSVersion
$XcodeRootPath = Get-XcodeRootPath -Version $Version
Write-Host "Approving Xcode license for '$XcodeRootPath'..."
$xcodeBuildPath = Get-XcodeToolPath -XcodeRootPath $XcodeRootPath -ToolName "xcodebuild"
Invoke-ValidateCommand -Command "sudo $xcodeBuildPath -license accept" -Timeout 15
if ($os.IsVentura -or $os.IsVenturaArm64) {
Invoke-ValidateCommand -Command "sudo $xcodeBuildPath -license accept" -Timeout 15
} else {
Invoke-ValidateCommand -Command "sudo $xcodeBuildPath -license accept"
}
}
function Install-XcodeAdditionalPackages {