[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:
Mikhail Timofeev
2021-07-29 16:15:45 +03:00
committed by GitHub
parent 96965b9b75
commit 52d30ac08c

View File

@@ -15,7 +15,7 @@ if ([string]::IsNullOrEmpty($env:XCODE_INSTALL_USER) -or [string]::IsNullOrEmpty
$env:SPACESHIP_SKIP_2FA_UPGRADE = 1 $env:SPACESHIP_SKIP_2FA_UPGRADE = 1
$os = Get-OSVersion $os = Get-OSVersion
$xcodeVersions = Get-ToolsetValue "xcode.versions" [Array]$xcodeVersions = Get-ToolsetValue "xcode.versions"
$defaultXcode = Get-ToolsetValue "xcode.default" $defaultXcode = Get-ToolsetValue "xcode.default"
[Array]::Reverse($xcodeVersions) [Array]::Reverse($xcodeVersions)
$threadCount = "5" $threadCount = "5"