jzaefferer / commitplease

Validates strings as commit messages
87 stars 17 forks source link

Avoid race condition in install.js when creating .git/hooks #77

Closed alisianoi closed 8 years ago

alisianoi commented 8 years ago

Closes #76

I am not sure how to properly exit from a catch block: with process.exit(1) or rethrowing the error.

jzaefferer commented 8 years ago

I'm not sure either, but doing both in one method is questionable. Since we're using process.exit(0) already, I suggest we stick with that.

alisianoi commented 8 years ago

I have prepublished this as 2.7.1-0 under beta tag. This PR fixes Angular's CircleCI failure (it still fails but bacause of gulp lint on some test, not because of us). What do you think about merging it? Does it solve your CircleCI problem?

jzaefferer commented 8 years ago

Just tested this, works well! Even as a pre-push hook - this is what I added to the readme for the project: https://gist.github.com/jzaefferer/a4b588abb91e6a020c28aa07880f16a3 - might be useful for other projects as well.

alisianoi commented 8 years ago

Glad to hear it! Will add that bit to the README, then merge this branch, create 2.7.1, publish on npm and then go to update angular PRs.