Skip to content

Commit 15eb783

Browse files
authored
Improve the list parsing in the workflow scripts (#2210)
1 parent 2ebf1ea commit 15eb783

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/common.main.kts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,11 @@ val Matrix.Companion.axes by lazy {
165165
}
166166

167167
fun Properties.getList(key: String) =
168-
getProperty(key).trim().split("""\s*+,\s*+""".toRegex())
168+
getProperty(key)
169+
?.trim()
170+
?.split("""\s*+,\s*+""".toRegex())
171+
?.filter { it.isNotBlank() }
172+
?: emptyList()
169173

170174
data class SetupBuildEnv(
171175
val additionalJavaVersion: String? = null

0 commit comments

Comments
 (0)