Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support node managers (nodenv, mise, etc.) #102

Closed
IlyaSemenov opened this issue Feb 5, 2024 · 2 comments
Closed

Support node managers (nodenv, mise, etc.) #102

IlyaSemenov opened this issue Feb 5, 2024 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@IlyaSemenov
Copy link
Contributor

When using certain node version managers, there is sometimes no npx executable in path, and commit hooks fail when executed from a GUI git client:

.git/hooks/pre-commit: line 2: npx: command not found

husky works around that case by executing ~/.huskyrc prior to commit hook: typicode/husky#369

For instance, for mise it would contain:

export PATH="$HOME/.local/share/mise/shims:$PATH"

Can we have a similar option in simple-git-hooks?

@toplenboren
Copy link
Owner

Hi, nice suggestion. Feel free to send pull request to this repo 🚀

@toplenboren
Copy link
Owner

toplenboren commented Mar 3, 2024

Should be live in 2.10.0. Thanks @IlyaSemenov for the issue and the fix!

https://www.npmjs.com/package/simple-git-hooks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants