tarmolov / git-hooks-js

A tool to manage and run project git hooks
167 stars 30 forks source link

Relative path to git-hooks #49

Closed ruslan-polutsygan closed 6 years ago

ruslan-polutsygan commented 6 years ago

Hi

I'm talking about this https://github.com/tarmolov/git-hooks-js/blob/master/lib/git-hooks.js#L53-L54 It produces code like

require('../../../../../../....../node_modules/git-hooks/lib/git-hooks').run .....

inside git hook files (e.g. .git/hooks/post-merge). But, I'm building cli tool which relies on git-hooks inside. Problem occurs if repo changes it's location, so relative path becomes broken. I'd would suggest to change relative path with absolute. I can prepare PR if you interested in it.

Unless you can suggest anything else?

Thanks

ruslan-polutsygan commented 6 years ago

@tarmolov here is PR https://github.com/tarmolov/git-hooks-js/pull/50