conventional-changelog-archived-repos / validate-commit-msg

DEPRECATED. Use https://github.com/marionebl/commitlint instead. githook to validate commit messages are up to standard
http://conventionalcommits.org/
MIT License
556 stars 101 forks source link

Fix validate exit #104

Closed nickbalestra closed 6 years ago

nickbalestra commented 6 years ago

I've noticed that with #92 (released with 2.13.0) we introduced a bug where the CLI dosn't exit the process correctly anymore. This was due to wrapping validate() in a try/catch statement although neither validate() or validateMessage() actually throws.

To reproduce:

codecov-io commented 6 years ago

Codecov Report

Merging #104 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #104   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           3      3           
  Lines         126    126           
=====================================
  Hits          126    126

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 6d23bbc...077d8b3. Read the comment docs.

Garbee commented 6 years ago

Ah, another bug here is the wrong status code was being returned too for invalid states. Good catch.