-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
Pre-commit hooks such as lefthook
cause an error saying env: node: No such file or directory
#236
Comments
Has this been resolved yet? I try to use a pre-commit hook to set the timestamp in a file, which then is used in my project to reload assets to cache based on that, so cache refreshes with new builds. But I cannot use It does work perfectly fine when I use |
Hello! I haven't tried it yet, sorry. I'll try to give some feedback during the weekend. |
I have tested it on macOS, with the same pre-commit hook, there it works. I had some other unrelated issues with my Mint installation, so decided to go new install with it. ully new Linux Mint 22 installation, same pre-commit hook, clean flatpack Gitnuro install, exactly the same issue on |
That's probably due to Flatpak sandboxing, it's a different issue. As a workaround, does it work if you add this before the git command? |
I'll try that. I normally always install via DEB files, I'll try it soon, will be at home soon. I'll reply to this with the result, so future people might find this. |
@JetpackDuba thank you so much, that was it. For reference, this is what I use: exec /usr/bin/flatpak-spawn --host --env=TERM=xterm-256color git add ..... |
Describe the bug
When using a pre-commit hook such as
lefthook
, it is impossible to commit due to a popup error indicating thatnode
was not found.To Reproduce
lefthook.yml
with the following content:README.md
and add a commit message.An error saying that
node
cannot be found will be shown, even if Node is installed and available on the terminal path. (It even works if I pop open a terminal from Gitnuro and runnode -v
orgit commit
.)Expected behavior
The commit hook should run exactly as it does if using
git commit
from the CLI, and no error should be shown.Screenshots
Desktop (please complete the following information):
OS: macOS 15.1
Gitnuro version: 1.3.1
The text was updated successfully, but these errors were encountered: