Skip to content

Commit

Permalink
Fixed mima so that exit values are non-zero on failure.
Browse files Browse the repository at this point in the history
  • Loading branch information
jsuereth committed Nov 30, 2012
1 parent f68764d commit 76651ac
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -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
}
}

Expand All @@ -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.