Fix pre-commit hook without using -P.