Browse Source

Fix could not find application image error on macOS (#1811)

pull/1814/head
Thomas Vos 3 years ago committed by GitHub
parent
commit
ec2a7e8677
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/desktop/application/tasks/AbstractRunDistributableTask.kt

2
gradle-plugins/compose/src/main/kotlin/org/jetbrains/compose/desktop/application/tasks/AbstractRunDistributableTask.kt

@ -34,6 +34,8 @@ abstract class AbstractRunDistributableTask @Inject constructor(
fun run() {
val appDir = appImageRootDir.ioFile.let { appImageRoot ->
val files = appImageRoot.listFiles()
// Sometimes ".DS_Store" files are created on macOS, so ignore them.
?.filterNot { it.name == ".DS_Store" }
if (files == null || files.isEmpty()) {
error("Could not find application image: $appImageRoot is empty!")
} else if (files.size > 1) {

Loading…
Cancel
Save