zx icon indicating copy to clipboard operation
zx copied to clipboard

Install and use locally in pre-commit

Open troywweber7 opened this issue 2 years ago • 1 comments

I'm struggling to use zx when installed locally. It seems I have to install it globally if I want to run it directly with ./pre-commit.mjs. Or if I add node_modules/.bin to the path, then it works when I'm at the project root. Under .git/hooks, however, that path change won't stick unless it was an absolute path. What is the best approach to this situation?

troywweber7 avatar Aug 05 '22 21:08 troywweber7

This is one viable solution, I think. I guess I want to check that this is what the library author's would recommend in my situation as well. If so, I'm satisfied with that.

troywweber7 avatar Aug 08 '22 15:08 troywweber7