1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-26 08:27:12 -07:00

Better error reporting.

This commit is contained in:
Cedric Beust 2016-07-10 23:02:42 -08:00
parent 360db9375c
commit 615750c287

View file

@ -35,10 +35,11 @@ class DependencyManager @Inject constructor(val executors: KobaltExecutors, val
// the first one that produces an actual file // the first one that produces an actual file
val result = listOf(File(projectDirectory), Kobalt.context?.internalContext?.absoluteDir).map { val result = listOf(File(projectDirectory), Kobalt.context?.internalContext?.absoluteDir).map {
File(it, idPath) File(it, idPath)
}.first { }.firstOrNull {
it.exists() it.exists()
} }
result result ?: throw KobaltException("Couldn't find $id")
} else { } else {
File(idPath) File(idPath)
} }