-
Notifications
You must be signed in to change notification settings - Fork 220
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
Lefthook with Git GUI #99
Comments
I don't know what happens when Tower execute scripts. For example Obviosly the hooks script try to execute lefthook but it not accesable in PATH.
You can try to debug Other variants:
|
same behavior with
same behavior after commit via Tower, linters have worked and after this hooks have been deleted |
🤷♂️ Is it works as expected from console?
|
yes
also if I do commit from the console then everything works:
|
I'm having the same problem so I've sent a support request to Tower, I'll update this issue if I get a response. |
I'm having this problem too. |
I raised a bug report with Tower, stating how my pre-commit hooks would run successfully and then get deleted when committing through Tower, and how this was not the behaviour when committing via the command line. This was their response:
|
if you are on mac, the solution here is helping me on macOS Catalina, especially |
Facing the same issue when using SourceTree. |
Workaround: sudo launchctl config user path "/usr/local/bin:$PATH" Restart computer afterward References: |
Hey! Now you can provide your envs in an |
@mrexox do you have a "recipe" on how to use the "rc" file option? I am using Windows and the Windows Subsystem for Linux. So my Git environment is inside the WSL. My Git GUI (SmartGit) runs on Windows and reports "Can't find lefthook in PATH". Now I am trying to find a solution on how to solve it: |
Hey @bennycode! How did you install lefthook? You need to get the absolute path to lefthook executable and add it to your # lefthook.rc
PATH=$PATH:/path/to/a/folder/with/lefthook/executable Then add # lefthook.yml
rc: /home/me/lefthook.rc # should be an absolute path
... |
I'm currently using Husky and lint-staged with Tower, hooks with this setup work
I want to try Lefthook, but having problems
Tower
https://www.git-tower.com/mac
set hooks with this command
made one commit via Tower, linters have worked, but after this hooks have been deleted
unfortunately could not find a way which git commands uses Tower when committing
Source tree
https://www.sourcetreeapp.com/
Husky and lint-staged
Lefthook
hooks did not work when committing
System info
Do you know why hooks can disappear after a commit?
The text was updated successfully, but these errors were encountered: