[macos] use unxip if available for XCode unpacking (#7992)

This commit is contained in:
ilia-shipitsin
2023-08-07 11:53:07 +02:00
committed by GitHub
parent c493b069d2
commit 4ec9fdae13
4 changed files with 19 additions and 3 deletions

View File

@@ -1,3 +1,4 @@
Import-Module "$PSScriptRoot/Common.Helpers.psm1"
Import-Module "$PSScriptRoot/Xcode.Helpers.psm1"
function Install-XcodeVersion {
@@ -86,7 +87,11 @@ function Expand-XcodeXipArchive {
Write-Host "Extracting Xcode from '$xcodeXipPath'"
Push-Location $DownloadDirectory
Invoke-ValidateCommand "xip -x $xcodeXipPath"
if(Test-CommandExists 'unxip') {
Invoke-ValidateCommand "unxip $xcodeXipPath"
} else {
Invoke-ValidateCommand "xip -x $xcodeXipPath"
}
Pop-Location
if (Test-Path "$DownloadDirectory/Xcode-beta.app") {