Files
coolify/hooks/pre-commit

11 lines
256 B
Bash

#!/bin/sh
# Detect whether /dev/tty is available & functional
if sh -c ": >/dev/tty" >/dev/null 2>/dev/null; then
exec < /dev/tty
fi
files=$(git diff --cached --name-only --diff-filter=ACM -- '*.php');
$(pwd)/vendor/bin/pint $files -q
git add $files