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

Bubble up the error correctly.

This commit is contained in:
Cedric Beust 2016-02-20 12:08:17 -08:00
parent 0ad490ef90
commit a6db954973

View file

@ -2,7 +2,6 @@ package com.beust.kobalt.internal
import com.beust.kobalt.KobaltException import com.beust.kobalt.KobaltException
import com.beust.kobalt.TaskResult import com.beust.kobalt.TaskResult
import com.beust.kobalt.api.Kobalt
import com.beust.kobalt.misc.* import com.beust.kobalt.misc.*
import com.google.common.collect.HashMultimap import com.google.common.collect.HashMultimap
import java.lang.reflect.InvocationTargetException import java.lang.reflect.InvocationTargetException
@ -97,6 +96,7 @@ public class DynamicGraphExecutor<T>(val graph: DynamicGraph<T>,
"a cycle in the dependencies.\n Nodes left: " + graph.dump(graph.nodesReady)) "a cycle in the dependencies.\n Nodes left: " + graph.dump(graph.nodesReady))
} else { } else {
error("Error during the build") error("Error during the build")
lastResult = TaskResult(false)
} }
} }
return if (lastResult.success) 0 else 1 return if (lastResult.success) 0 else 1