Webstorm Run git hooks option disappeared

The option to run git hooks when pushing to the repo has disappeared. How do I reenable it? Webstorm version 2020.3.1

 

9 comments
Comment actions Permalink

Please share the listing of the .git/hooks folder from the repo. The checkbox is shown only when there are executable pre-commit or commit-msg hooks in the folder.

0
Comment actions Permalink

What if I use latest version of husky and hook executable is located under `.husky` folder?

1
Comment actions Permalink

Same here. And I do have runnable hooks in .git/hooks folder. But the checkbox is still not activated.

ubuntu@DESKTOP-AOBR712:~/code/monorepo-template$ ls .git/hooks
applypatch-msg husky.local.sh post-applypatch post-commit post-rewrite pre-applypatch pre-commit pre-push prepare-commit-msg sendemail-validate
commit-msg husky.sh post-checkout post-merge post-update pre-auto-gc pre-merge-commit pre-rebase push-to-checkout

 

0
Comment actions Permalink

Same here, hooks are in .husky folder, no run git hooks checkbox.

Please react to this issue

0
Comment actions Permalink

I ran into the same issue. The solution for me was to verify execute permissions on the hook files. When changed, the option you are looking for is enabled.

 

0
Comment actions Permalink

edwinvelez hi! could you help please, how to verify permissions? and how to change them. thanks!

0
Comment actions Permalink

Aneelia I run Linux on my machine. Assuming you are too, look in your project's `.git/hooks` directory and change permission on the hook file you want to run i.e. `chmod 744 <hook_file_name>`. 744 permissions should match existing `.sample` hook files already in that directory. If you are on Windows, right click the same hook file, then properties, then set execute permissions. Hopefully this will work for your situation.

0
Comment actions Permalink

I verified execute permission on hook files and the checkbox is still greyed out/disabled any suggestions?

0
Comment actions Permalink

If you use husky, run the following command: 

husky install

I'm using the husky version: 7.x.x

0

Please sign in to leave a comment.