mirror of
https://github.com/actions/runner-images.git
synced 2025-12-24 10:28:00 +08:00
[macos] use unxip if available for XCode unpacking (#7992)
This commit is contained in:
@@ -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") {
|
||||
|
||||
Reference in New Issue
Block a user