File tree 1 file changed +6
-3
lines changed
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -89,10 +89,12 @@ function maybeRemoveOldXcodes() {
89
89
// Extract the SDK version from the toolchain file and normalize it.
90
90
function extractSDKVersion ( toolchainFile ) {
91
91
const contents = fs . readFileSync ( toolchainFile , 'utf8' ) ;
92
- const match = / m a c O S \s ( \d + ( \. \d + ) ? ) \s S D K \n \# / . exec ( contents ) ;
93
- if ( ! match ) return null ;
92
+ const match = / m a c O S \s + (?: ( \d + (?: \. \d + ) ? ) \s + S D K | S D K \s + ( \d + (?: \. \d + ) ? ) ) / . exec ( contents ) ;
94
93
95
- return match [ 1 ] . includes ( '.' ) ? match [ 1 ] : `${ match [ 1 ] } .0` ;
94
+ if ( match ?. [ 1 ] ) return match [ 1 ] . includes ( '.' ) ? match [ 1 ] : `${ match [ 1 ] } .0` ;
95
+ if ( match ?. [ 2 ] ) return match [ 2 ] . includes ( '.' ) ? match [ 2 ] : `${ match [ 2 ] } .0` ;
96
+
97
+ return null ;
96
98
}
97
99
98
100
function expectedSDKVersion ( ) {
@@ -110,6 +112,7 @@ function expectedSDKVersion() {
110
112
}
111
113
112
114
const version = extractSDKVersion ( macToolchainPy ) ;
115
+ console . log ( 'version: ' , version ) ;
113
116
if ( isNaN ( Number ( version ) ) || ! SDKs [ version ] ) {
114
117
console . warn (
115
118
color . warn ,
You can’t perform that action at this time.
0 commit comments