apache / incubator-annotator

Apache Annotator provides annotation enabling code for browsers, servers, and humans.
https://annotator.apache.org/
Apache License 2.0
219 stars 44 forks source link

Do not install husky git hooks when building a release tarball #72

Closed tilgovi closed 4 years ago

tilgovi commented 4 years ago

I just discovered that husky will install its git hooks at the nearest git repository. I keep my dotfiles in git and was surprised to find husky hooks in my ~/.git/hooks directory, from when I was testing an Annotator release.

Here's my comment on a husky issue:

I'd like to use husky in a project that will be distributed as a tarball. I don't want husky to install hooks when users build the project.

Would it be possible to default to the old behavior of assuming that the git directory is at the same level as package.json, install no hooks if it's not found, and add a configuration switch for setting an explicit root? That would make the default safer while allowing those with different layouts the ability to still use husky.

https://github.com/typicode/husky/issues/36#issuecomment-608192841

I think we need to resolve this before release because I really don't want to install hooks into unknowable locations on users' machines.