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:
parent
360db9375c
commit
615750c287
1 changed files with 3 additions and 2 deletions
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue