Skip to content

Commit 5487dba

Browse files
use "license accept timeout" only on MacOS-13 (#8084)
1 parent 9f81916 commit 5487dba

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

images/macos/helpers/Xcode.Installer.psm1

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,17 @@ function Approve-XcodeLicense {
126126
[string]$Version
127127
)
128128

129+
$os = Get-OSVersion
130+
129131
$XcodeRootPath = Get-XcodeRootPath -Version $Version
130132
Write-Host "Approving Xcode license for '$XcodeRootPath'..."
131133
$xcodeBuildPath = Get-XcodeToolPath -XcodeRootPath $XcodeRootPath -ToolName "xcodebuild"
132-
Invoke-ValidateCommand -Command "sudo $xcodeBuildPath -license accept" -Timeout 15
134+
135+
if ($os.IsVentura -or $os.IsVenturaArm64) {
136+
Invoke-ValidateCommand -Command "sudo $xcodeBuildPath -license accept" -Timeout 15
137+
} else {
138+
Invoke-ValidateCommand -Command "sudo $xcodeBuildPath -license accept"
139+
}
133140
}
134141

135142
function Install-XcodeAdditionalPackages {

0 commit comments

Comments
 (0)