Files
dolibarr/dev/setup/git/hooks/pre-commit
Laurent Destailleur fb54306a1e Update precommit
2024-02-18 13:39:25 +01:00

21 lines
608 B
Bash

#!/usr/bin/env bash
# File generated by pre-commit: https://pre-commit.com
# ID: 138fd403232d2ddd5efb44317e38bf03
# start templated
INSTALL_PYTHON=/usr/bin/python3
ARGS=(hook-impl --config=.pre-commit-config.yaml --hook-type=pre-commit)
# end templated
HERE="$(cd "$(dirname "$0")" && pwd)"
ARGS+=(--hook-dir "$HERE" -- "$@")
if [ -x "$INSTALL_PYTHON" ]; then
exec "$INSTALL_PYTHON" -mpre_commit "${ARGS[@]}" 1>&2
elif command -v pre-commit > /dev/null; then
exec pre-commit "${ARGS[@]}" 1>&2
else
echo '`pre-commit` not found. Did you forget to activate your virtualenv?' 1>&2
exit 1
fi