This is my pre-commit script:
#!/bin/bash
for f in .git/hooks/pre-commit.d/*; do
if [ -x \"$f\" ]; then
if ! \"$f\"; then
echo \"DID
You can check in your pre-commit script for the $VIRTUAL_ENV variable and prepend it to $PATH accordingly:
#!/bin/bash
if [ -n $VIRTUAL_ENV ]; then
PATH=$VIRTUAL_ENV/bin:$PATH
fi
for f in .git/hooks/pre-commit.d/*; do
if [ -x "$f" ]; then
if ! "$f"; then
echo "DID NOT COMMIT YOUR CHANGES!";
exit 1
fi
fi
done