zx
zx copied to clipboard
Install and use locally in pre-commit
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?
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.