mirror of
https://github.com/actions/runner-images.git
synced 2025-12-20 06:35:47 +00:00
[macOS] Fix xcode installation script if there is only one Xcode version to install (#3808)
* Cast xcodeVersions variable to array
This commit is contained in:
@@ -15,7 +15,7 @@ if ([string]::IsNullOrEmpty($env:XCODE_INSTALL_USER) -or [string]::IsNullOrEmpty
|
||||
$env:SPACESHIP_SKIP_2FA_UPGRADE = 1
|
||||
|
||||
$os = Get-OSVersion
|
||||
$xcodeVersions = Get-ToolsetValue "xcode.versions"
|
||||
[Array]$xcodeVersions = Get-ToolsetValue "xcode.versions"
|
||||
$defaultXcode = Get-ToolsetValue "xcode.default"
|
||||
[Array]::Reverse($xcodeVersions)
|
||||
$threadCount = "5"
|
||||
@@ -36,8 +36,8 @@ if ($os.IsLessThanCatalina) {
|
||||
$latestXcodeVersion = $xcodeVersions | Select-Object -Last 1 -ExpandProperty link
|
||||
Install-XcodeAdditionalPackages -Version $latestXcodeVersion
|
||||
}
|
||||
$xcodeVersions | ForEach-Object {
|
||||
Invoke-XcodeRunFirstLaunch -Version $_.link
|
||||
$xcodeVersions | ForEach-Object {
|
||||
Invoke-XcodeRunFirstLaunch -Version $_.link
|
||||
}
|
||||
Invoke-XcodeRunFirstLaunch -Version $defaultXcode
|
||||
|
||||
|
||||
Reference in New Issue
Block a user