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

Fix task error detection.

This commit is contained in:
Cedric Beust 2015-11-16 04:46:36 -08:00
parent c238b47141
commit 6726edc3cb

View file

@ -56,11 +56,11 @@ public class TaskManager @Inject constructor(val plugins: Plugins, val args: Arg
val graph = DynamicGraph<PluginTask>() val graph = DynamicGraph<PluginTask>()
targets.forEach { target -> targets.forEach { target ->
if (! tasksByNames.contains(target)) { val ti = TaskInfo(target)
if (! tasksByNames.contains(ti.task)) {
throw KobaltException("Unknown task: $target") throw KobaltException("Unknown task: $target")
} }
val ti = TaskInfo(target)
if (ti.matches(projectName)) { if (ti.matches(projectName)) {
val task = tasksByNames[ti.task] val task = tasksByNames[ti.task]
if (task != null && task.plugin.accept(project)) { if (task != null && task.plugin.accept(project)) {