git-hooks-js
git-hooks-js copied to clipboard
Use git rev-parse --git-dir to find a git dir
Inspired by @Kampfgnom's work, but using execSync to simplify things a lot.
This fixes #48, meaning that hooks will be installed if the project is a submodule.
Coverage decreased (-1.08%) to 97.872% when pulling 4b1ac7ca6dd87c24deb60613a56d435921a17154 on rjmunro:feature/parse-git-dir into f7e9bd5b00a0b79b831b5383ba88e9446eb1cd82 on tarmolov:master.
@tarmolov This should be ready to merge. It's failing coveralls because it adds one more uncovered line, which is a throw statement that happens if there is an unknown error. I don't know how to fake the kind of error, so I can't write tests for it. Something like git not being installed, or trying to install in a folder that doesn't exist might do it - I'm not sure.