git-hooks-js icon indicating copy to clipboard operation
git-hooks-js copied to clipboard

Use git rev-parse --git-dir to find a git dir

Open rjmunro opened this issue 7 years ago • 2 comments

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.

rjmunro avatar May 02 '18 09:05 rjmunro

Coverage Status

Coverage decreased (-1.08%) to 97.872% when pulling 4b1ac7ca6dd87c24deb60613a56d435921a17154 on rjmunro:feature/parse-git-dir into f7e9bd5b00a0b79b831b5383ba88e9446eb1cd82 on tarmolov:master.

coveralls avatar May 03 '18 09:05 coveralls

@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.

rjmunro avatar Jun 12 '18 11:06 rjmunro