Skip to content

Commit

Permalink
Analytics: fix UnsupportedOperationException: Empty collection can't …
Browse files Browse the repository at this point in the history
…be reduced (#1840)
  • Loading branch information
bartekpacia authored Jul 29, 2024
1 parent fa278cf commit eb352a3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions maestro-cli/src/main/java/maestro/cli/util/IOSEnvUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ object IOSEnvUtils {
val installedRuntimes = topLevelDirs
.map { it.resolve("Library/Developer/CoreSimulator/Profiles/Runtimes") }
.map { it.listFiles() }
.reduce { acc, list -> acc + list }
.map { file -> file.nameWithoutExtension }
.reduceOrNull { acc, list -> acc + list }
?.map { file -> file.nameWithoutExtension }

return installedRuntimes
return installedRuntimes ?: emptyList()
}

val xcodeVersion: String?
Expand Down

0 comments on commit eb352a3

Please sign in to comment.