JetBrains / sbt-idea-plugin

Develop IntelliJ plugins with Scala and SBT
Apache License 2.0
97 stars 28 forks source link

The publishPlugin task has a zero exit status even when it fails #82

Closed JavierGelatti closed 3 years ago

JavierGelatti commented 3 years ago

I think it'll be very useful to have the sbt publishPlugin command return a non-zero exit status if it fails (to signal the failure). This is necessary, for instance, to be able to easily integrate it in a CI workflow.

As an example, see this "successful" build (inside the Publish nightly step): image

JavierGelatti commented 3 years ago

:spiral_notepad: I guess this is the relevant part of the code, in which the error is logged and then ignored: https://github.com/JetBrains/sbt-idea-plugin/blob/9a39f9869f037a50f1e088295b4c488cdd524602/ideaSupport/src/main/scala/org/jetbrains/sbtidea/tasks/PublishPlugin.scala#L29-L34