ghooks-org/ghooks

Breaks on folders with single quote character

ronkorving opened this issue · 3 comments

In all git hook scripts, the nodeModulesPath string that is injected does not have its single quote characters escaped, causing the resulting script to be unparseable.

While I would like to move to Husky, we still use ghooks because of its excellent Windows support, and so I wanted to raise this issue.

Good catch! If I understand it correctly, a path like c:\john's projects\my project breaks because of john's's single quote… right?

Would you like to send us a PR with a test case and the fix? Otherwise we can try to address it when we have time (sorry I'm a bit poor on time atm). This, in theory, should be a simple fix.

Exactly right, that is the problem I observed. If you are still interested in merging and releasing (given the deprecated state of the project), I can probably find a bit of time to make a PR.

Definitely interested in getting contributions. The reason why we moved ghooks into its own organization ghooks-org is because there was enough interest to keep the project alive (we still need to get the ball rolling again and smash any bugs – feature-wise, it seems pretty stable, but that's why it is here on github so we can have open conversations on what's for the future). Thanks for you interest!