Log output of dependency information tasks instead of printing (#82)

This allows use of "last-grep" to filter the output.

Fixes https://github.com/coursier/coursier/issues/1191
This commit is contained in:
Daniel Capo Sobral 2019-06-12 16:58:35 -06:00 committed by Alexandre Archambault
parent 4cd80259aa
commit bc38ddc252
1 changed files with 2 additions and 3 deletions

View File

@ -83,8 +83,7 @@ object DisplayTasks {
val resolutions = coursierResolutionTask(sbtClassifiers, ignoreArtifactErrors).value
for (ResolutionResult(subGraphConfigs, resolution, dependencies) <- resolutions) {
// use sbt logging?
println(
streams.value.log.info(
s"$projectName (configurations ${subGraphConfigs.toVector.sorted.mkString(", ")})" + "\n" +
Print.dependencyTree(
resolution,
@ -125,7 +124,7 @@ object DisplayTasks {
reverse = true,
colors = !sys.props.get("sbt.log.noformat").toSeq.contains("true")
)
println(strToPrint)
streams.value.log.info(strToPrint)
result.append(strToPrint)
result.append("\n")
}