File tree Expand file tree Collapse file tree 4 files changed +19
-3
lines changed Expand file tree Collapse file tree 4 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -166,3 +166,12 @@ function Get-Architecture {
166166
167167 return $arch
168168}
169+
170+ function Test-CommandExists {
171+ param
172+ (
173+ [Parameter (Mandatory )] [string ] $Command
174+ )
175+
176+ [boolean ] (Get-Command $Command - ErrorAction ' SilentlyContinue' )
177+ }
Original file line number Diff line number Diff line change 1+ Import-Module " $PSScriptRoot /Common.Helpers.psm1"
12Import-Module " $PSScriptRoot /Xcode.Helpers.psm1"
23
34function Install-XcodeVersion {
@@ -86,7 +87,11 @@ function Expand-XcodeXipArchive {
8687
8788 Write-Host " Extracting Xcode from '$xcodeXipPath '"
8889 Push-Location $DownloadDirectory
89- Invoke-ValidateCommand " xip -x $xcodeXipPath "
90+ if (Test-CommandExists ' unxip' ) {
91+ Invoke-ValidateCommand " unxip $xcodeXipPath "
92+ } else {
93+ Invoke-ValidateCommand " xip -x $xcodeXipPath "
94+ }
9095 Pop-Location
9196
9297 if (Test-Path " $DownloadDirectory /Xcode-beta.app" ) {
Original file line number Diff line number Diff line change 202202 " tcl-tk" ,
203203 " r" ,
204204 " yq" ,
205- " imagemagick"
205+ " imagemagick" ,
206+ " unxip"
206207 ],
207208 "cask_packages" : [
208209 " julia" ,
Original file line number Diff line number Diff line change 7474 " zstd" ,
7575 " gmp" ,
7676 " r" ,
77- " yq"
77+ " yq" ,
78+ " unxip"
7879 ],
7980 "cask_packages" : [
8081 " julia" ,
You can’t perform that action at this time.
0 commit comments