pre-commit 623 B

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