Permalink
Browse files

Fixed mima so that exit values are non-zero on failure.

  • Loading branch information...
1 parent f68764d commit 76651ac92dbda323d1eab23454777904168fcd75 @jsuereth jsuereth committed Nov 30, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 reporter/src/main/scala/com/typesafe/tools/mima/cli/Main.scala
View
6 reporter/src/main/scala/com/typesafe/tools/mima/cli/Main.scala
@@ -78,14 +78,14 @@ class Main(args: List[String]) extends {
wrapString(" * " + p.description) mkString "\n "
}
- def run(): Unit = {
+ def run(): Int = {
val mima = makeMima
val problems = mima.collectProblems(prevfile, currentfile)
val header = "Found " + problems.size + " binary incompatibiities"
println(header)
println(Seq.fill(header.length)("=") mkString "")
problems map printProblem foreach println
- // TODO - System.exit(problems.size)
+ problems.size
}
}
@@ -94,6 +94,6 @@ object Main {
val runner = new Main(args.toList)
if (args.isEmpty || !runner.isDefined) println(runner.helpMsg)
- else runner.run()
+ else System.exit(runner.run())
}
}

0 comments on commit 76651ac

Please sign in to comment.