marick / lein-midje

Leiningen plugin for Midje
MIT License
78 stars 29 forks source link

Correct Exit Code Generation (fix #43) #45

Closed xsc closed 10 years ago

xsc commented 10 years ago

See this comment.

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.