You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#!/bin/bash
docker-compose run --rm web sh ./node_modules/pre-commit/hook # web is my docker-compose service name
RESULT=$?
[ $RESULT -ne 0 ] && exit 1
exit 0
Is there a way to customize pre-commit script in configuration or something? (rather than manual change)
Thanks
The text was updated successfully, but these errors were encountered:
Hi, I want to run pre-commit hook in my docker container as I moved my dev environment to the docker.
By default, pre-commit requires
npm install
in local environment to run./node_modules/pre-commit/hook
in .git/hooks/pre-commit script.When I did some research, I found this link https://spectrum.chat/node/general/pre-commit-with-docker~840290ba-1cb6-40e2-a7ad-7566054638b8. I changed the first line of the pre-commit script manually as below and it worked as expected although it's quite slow.
Is there a way to customize pre-commit script in configuration or something? (rather than manual change)
Thanks
The text was updated successfully, but these errors were encountered: