ghooks icon indicating copy to clipboard operation
ghooks copied to clipboard

Breaks on folders with single quote character

Open ronkorving opened this issue 7 years ago • 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.

ronkorving avatar Oct 19 '17 03:10 ronkorving

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.

gtramontina avatar Nov 06 '17 07:11 gtramontina

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.

ronkorving avatar Nov 06 '17 07:11 ronkorving

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!

gtramontina avatar Nov 06 '17 12:11 gtramontina