Skip to content

Commit ba6b0cc

Browse files
kalinjulttypic
authored andcommitted
fix: more robust readXcodeMajorVersion
1 parent e2eecf4 commit ba6b0cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugin/src/main/kotlin/io/github/ttypic/swiftklib/gradle/task/CompileSwiftTask.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ open class CompileSwiftTask @Inject constructor(
178178
}
179179

180180
val output = stdout.toString().trim()
181-
val (_, majorVersion) = "Xcode (\\d+)\\.\\d+\\.\\d+".toRegex().find(output)?.groupValues
181+
val (_, majorVersion) = "Xcode (\\d+)\\..*".toRegex().find(output)?.groupValues
182182
?: throw IllegalStateException("Can't find Xcode")
183183

184184
return majorVersion.toInt()

0 commit comments

Comments
 (0)