Skip to content

Commit

Permalink
Modifies binary and script resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederic Kneier committed Jun 15, 2023
1 parent ca28b53 commit e3262dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/kotlin/de/solugo/gradle/nodejs/NodeJsExtension.kt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class NodeJsExtension(private val project: Project) {
vararg folders: File,
predicate: (File) -> Boolean,
) = folders.firstNotNullOfOrNull {
it.listFiles()?.firstOrNull(predicate)?.absolutePath
it.listFiles()?.firstOrNull(predicate)?.takeIf { it.exists() }?.absolutePath
} ?: error("Could not resolve $target in ${folders.joinToString(prefix = "[", postfix = "]")}")
})
}
Expand Down

0 comments on commit e3262dc

Please sign in to comment.