Skip to content

Commit

Permalink
fix NPE when uploading analytics, for sure (#1876)
Browse files Browse the repository at this point in the history
fix NPE, for sure
  • Loading branch information
bartekpacia authored Aug 2, 2024
1 parent dc0a944 commit 48c5120
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 @@ -15,11 +15,11 @@ object IOSEnvUtils {

val installedRuntimes = topLevelDirs
.map { it.resolve("Library/Developer/CoreSimulator/Profiles/Runtimes") }
.map { it.listFiles() }
.map { it.listFiles() ?: emptyArray() }
.reduceOrNull { acc, list -> acc + list }
?.map { file -> file.nameWithoutExtension }
?.map { file -> file.nameWithoutExtension } ?: emptyList()

return installedRuntimes ?: emptyList()
return installedRuntimes
}

val xcodeVersion: String?
Expand Down

0 comments on commit 48c5120

Please sign in to comment.