mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 16:28:12 -07:00
Don't blow up if logLevel == 1.
This commit is contained in:
parent
ed43660d50
commit
f6927e2304
1 changed files with 8 additions and 6 deletions
|
@ -2,10 +2,8 @@ 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.misc.NamedThreadFactory
|
import com.beust.kobalt.api.Kobalt
|
||||||
import com.beust.kobalt.misc.error
|
import com.beust.kobalt.misc.*
|
||||||
import com.beust.kobalt.misc.log
|
|
||||||
import com.beust.kobalt.misc.toString
|
|
||||||
import com.google.common.collect.HashMultimap
|
import com.google.common.collect.HashMultimap
|
||||||
import java.lang.reflect.InvocationTargetException
|
import java.lang.reflect.InvocationTargetException
|
||||||
import java.util.concurrent.*
|
import java.util.concurrent.*
|
||||||
|
@ -94,8 +92,12 @@ public class DynamicGraphExecutor<T>(val graph: DynamicGraph<T>,
|
||||||
}
|
}
|
||||||
executor.shutdown()
|
executor.shutdown()
|
||||||
if (graph.freeNodes.size == 0 && graph.nodesReady.size > 0) {
|
if (graph.freeNodes.size == 0 && graph.nodesReady.size > 0) {
|
||||||
throw KobaltException("Couldn't find any free nodes but a few nodes still haven't run, there is " +
|
if (KobaltLogger.LOG_LEVEL > 1) {
|
||||||
"a cycle in the dependencies.\n Nodes left: " + graph.dump(graph.nodesReady))
|
throw KobaltException("Couldn't find any free nodes but a few nodes still haven't run, there is " +
|
||||||
|
"a cycle in the dependencies.\n Nodes left: " + graph.dump(graph.nodesReady))
|
||||||
|
} else {
|
||||||
|
error("Error during the build")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return if (lastResult.success) 0 else 1
|
return if (lastResult.success) 0 else 1
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue