marick/lein-midje — pull request #45 by xsc (2013-10-05 13:01:10+00:00)
Title: Correct Exit Code Generation (fix #43)

See [this comment](https://github.com/marick/lein-midje/issues/43#issuecomment-25747508).

This uses `leiningen.core.main/exit` if a project's map contains `:eval-in :leiningen` or `:eval-in-leiningen true`, and `System/exit` otherwise. Also, the respective exit function is only called if there really are any failures and the maximum exit code is restored to 255.

This means that the plugin now exits correctly in both cases while also offering the possibility to be run within another plugin's context, producing an examinable error code contained in an exception thrown in case of failures.

Again, sorry for breaking the plugin. I hope this fixes the issue, leaving only the small typo corrections to be pulled from #44.